create-jnrs-template-vue 1.0.5 → 1.1.1
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/LICENSE +21 -0
- package/README.md +49 -0
- package/bin/create.js +15 -17
- package/jnrs-template-vue/.prettierrc.json +12 -0
- package/jnrs-template-vue/README.md +37 -33
- package/jnrs-template-vue/eslint.config.js +40 -0
- package/jnrs-template-vue/package.json +3 -6
- package/package.json +7 -5
- package/bin/release.mjs +0 -154
- package/jnrs-template-vue/dist/assets/403-55YASZLT.js +0 -1
- package/jnrs-template-vue/dist/assets/403-D-mG3HAD.css +0 -1
- package/jnrs-template-vue/dist/assets/404-BqrrbZGC.png +0 -0
- package/jnrs-template-vue/dist/assets/404-D4Vl2MWc.css +0 -1
- package/jnrs-template-vue/dist/assets/404-DVLSsp1-.js +0 -1
- package/jnrs-template-vue/dist/assets/@jnrs/core-BU1kTVoG.js +0 -6
- package/jnrs-template-vue/dist/assets/@jnrs/core-BU1kTVoG.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/@jnrs/shared-l0sNRNKZ.js +0 -1
- package/jnrs-template-vue/dist/assets/@jnrs/vue-core-l0sNRNKZ.js +0 -1
- package/jnrs-template-vue/dist/assets/BlankLayout-B-kY6Y4b.css +0 -1
- package/jnrs-template-vue/dist/assets/BlankLayout-CkiI_Nhm.js +0 -1
- package/jnrs-template-vue/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/jnrs-template-vue/dist/assets/base-CiSqh4F9.css +0 -1
- package/jnrs-template-vue/dist/assets/base-CmE9WEcf.js +0 -5
- package/jnrs-template-vue/dist/assets/baseInfo-BiTxP_UO.css +0 -1
- package/jnrs-template-vue/dist/assets/baseInfo-BiTxP_UO.css.gz +0 -0
- package/jnrs-template-vue/dist/assets/baseInfo-CHuis_5y.js +0 -6
- package/jnrs-template-vue/dist/assets/baseInfo-CHuis_5y.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/cloneDeep-BVBQ-W19.js +0 -1
- package/jnrs-template-vue/dist/assets/el-button-5iH8Z9fP.js +0 -3
- package/jnrs-template-vue/dist/assets/el-button-5iH8Z9fP.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/el-button-BRDnKxwT.css +0 -1
- package/jnrs-template-vue/dist/assets/el-button-BRDnKxwT.css.gz +0 -0
- package/jnrs-template-vue/dist/assets/el-form-item-BWkJzdQ_.css +0 -1
- package/jnrs-template-vue/dist/assets/el-form-item-DylvNks9.js +0 -12
- package/jnrs-template-vue/dist/assets/el-form-item-DylvNks9.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/el-input-D6B3r8CH.css +0 -1
- package/jnrs-template-vue/dist/assets/el-input-D6B3r8CH.css.gz +0 -0
- package/jnrs-template-vue/dist/assets/el-popper-4UYDmLWx.js +0 -1
- package/jnrs-template-vue/dist/assets/el-popper-4UYDmLWx.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/el-popper-C41MzGWJ.css +0 -1
- package/jnrs-template-vue/dist/assets/el-tab-pane-BftfEp2_.js +0 -1
- package/jnrs-template-vue/dist/assets/el-tab-pane-BftfEp2_.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/el-tab-pane-DqZ6zn_1.css +0 -1
- package/jnrs-template-vue/dist/assets/el-tab-pane-DqZ6zn_1.css.gz +0 -0
- package/jnrs-template-vue/dist/assets/index-B1cTZm95.js +0 -1
- package/jnrs-template-vue/dist/assets/index-B5XrJJDw.js +0 -1
- package/jnrs-template-vue/dist/assets/index-BGgB6KhI.js +0 -1
- package/jnrs-template-vue/dist/assets/index-BYils8Mj.css +0 -1
- package/jnrs-template-vue/dist/assets/index-BYils8Mj.css.gz +0 -0
- package/jnrs-template-vue/dist/assets/index-CC-eWpht.css +0 -1
- package/jnrs-template-vue/dist/assets/index-CRcN6Pzu.js +0 -1
- package/jnrs-template-vue/dist/assets/index-CRcN6Pzu.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/index-CpWTb2J0.js +0 -1
- package/jnrs-template-vue/dist/assets/index-DN0EoMuW.js +0 -1
- package/jnrs-template-vue/dist/assets/index-DPbBrzRI.js +0 -1
- package/jnrs-template-vue/dist/assets/index-DebQgqfG.js +0 -1
- package/jnrs-template-vue/dist/assets/index-DebQgqfG.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/index-DqtQTKtP.css +0 -1
- package/jnrs-template-vue/dist/assets/index-DqtQTKtP.css.gz +0 -0
- package/jnrs-template-vue/dist/assets/index-LwepFxV8.css +0 -1
- package/jnrs-template-vue/dist/assets/index-LwepFxV8.css.gz +0 -0
- package/jnrs-template-vue/dist/assets/index-XBhlrMBC.js +0 -7
- package/jnrs-template-vue/dist/assets/index-XBhlrMBC.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/index-ZWYb22SS.js +0 -7
- package/jnrs-template-vue/dist/assets/index-ZWYb22SS.js.gz +0 -0
- package/jnrs-template-vue/dist/assets/omit-DbAcXfFA.js +0 -1
- package/jnrs-template-vue/dist/assets/securitySettings-BNnxaFkx.js +0 -1
- package/jnrs-template-vue/dist/assets/securitySettings-Nuun0dL6.css +0 -1
- package/jnrs-template-vue/dist/assets/useAvatar-DcJXzEPm.js +0 -1
- package/jnrs-template-vue/dist/favicon.ico +0 -0
- package/jnrs-template-vue/dist/index.html +0 -15
- package/jnrs-template-vue/dist/system/menu.json +0 -61
- package/jnrs-template-vue/node_modules/.bin/browserslist +0 -21
- package/jnrs-template-vue/node_modules/.bin/esbuild +0 -21
- package/jnrs-template-vue/node_modules/.bin/eslint +0 -21
- package/jnrs-template-vue/node_modules/.bin/jiti +0 -21
- package/jnrs-template-vue/node_modules/.bin/npm-run-all +0 -21
- package/jnrs-template-vue/node_modules/.bin/npm-run-all2 +0 -21
- package/jnrs-template-vue/node_modules/.bin/parser +0 -21
- package/jnrs-template-vue/node_modules/.bin/prettier +0 -21
- package/jnrs-template-vue/node_modules/.bin/random +0 -21
- package/jnrs-template-vue/node_modules/.bin/run-p +0 -21
- package/jnrs-template-vue/node_modules/.bin/run-s +0 -21
- package/jnrs-template-vue/node_modules/.bin/sass +0 -21
- package/jnrs-template-vue/node_modules/.bin/tsc +0 -21
- package/jnrs-template-vue/node_modules/.bin/tsserver +0 -21
- package/jnrs-template-vue/node_modules/.bin/tsx +0 -21
- package/jnrs-template-vue/node_modules/.bin/vite +0 -21
- package/jnrs-template-vue/node_modules/.bin/vue-tsc +0 -21
- package/jnrs-template-vue/node_modules/.vite/deps/@element-plus_icons-vue.js +0 -592
- package/jnrs-template-vue/node_modules/.vite/deps/@element-plus_icons-vue.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/_metadata.json +0 -181
- package/jnrs-template-vue/node_modules/.vite/deps/axios.js +0 -2629
- package/jnrs-template-vue/node_modules/.vite/deps/axios.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-4ANMNF4R.js +0 -3
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-4ANMNF4R.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-DQS4ONBU.js +0 -3
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-DQS4ONBU.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-G3PMV62Z.js +0 -35
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-G3PMV62Z.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-MXDGN2HV.js +0 -66567
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-MXDGN2HV.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-PQI3C63X.js +0 -3
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-PQI3C63X.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-UFUR7V47.js +0 -12728
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-UFUR7V47.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-ZPHMCC7P.js +0 -5467
- package/jnrs-template-vue/node_modules/.vite/deps/chunk-ZPHMCC7P.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus.js +0 -1025
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es.js +0 -1025
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_aside_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_aside_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_badge_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_badge_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_base_style_css.js +0 -1
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_base_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_button-group_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_button-group_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_button_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_button_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_cascader_style_css.js +0 -22
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_cascader_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_container_style_css.js +0 -9
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_container_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_header_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_header_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_icon_style_css.js +0 -1
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_icon_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_input_style_css.js +0 -2
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_input_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_main_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_main_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_menu-item_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_menu-item_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_menu_style_css.js +0 -9
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_menu_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_popover_style_css.js +0 -6
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_popover_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_sub-menu_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_sub-menu_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_tab-pane_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_tab-pane_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_tabs_style_css.js +0 -5
- package/jnrs-template-vue/node_modules/.vite/deps/element-plus_es_components_tabs_style_css.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/package.json +0 -3
- package/jnrs-template-vue/node_modules/.vite/deps/pinia-plugin-persistedstate.js +0 -122
- package/jnrs-template-vue/node_modules/.vite/deps/pinia-plugin-persistedstate.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/pinia.js +0 -5886
- package/jnrs-template-vue/node_modules/.vite/deps/pinia.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/vue-router.js +0 -2386
- package/jnrs-template-vue/node_modules/.vite/deps/vue-router.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vite/deps/vue.js +0 -343
- package/jnrs-template-vue/node_modules/.vite/deps/vue.js.map +0 -7
- package/jnrs-template-vue/node_modules/.vue-global-types/vue_3.5_0.d.ts +0 -138
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 JNRS Tech Co., Ltd.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# create-jnrs-template-vue
|
|
2
|
+
|
|
3
|
+
## ✨ 介绍
|
|
4
|
+
巨能前端工程化开发,Vue 项目模板脚手架
|
|
5
|
+
|
|
6
|
+
## 💻 技术栈
|
|
7
|
+
TypeScript、Vue3 生态
|
|
8
|
+
|
|
9
|
+
## 🧩 安装使用说明
|
|
10
|
+
jnrs-app-vue 是你的新项目名称
|
|
11
|
+
```shell
|
|
12
|
+
pnpm create jnrs-template-vue@latest jnrs-app-vue
|
|
13
|
+
cd jnrs-app-vue
|
|
14
|
+
pnpm i
|
|
15
|
+
pnpm dev
|
|
16
|
+
pnpm build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### 项目结构
|
|
20
|
+
```Text
|
|
21
|
+
jnrs-app-vue/
|
|
22
|
+
├── dist/ # 打包构建产物
|
|
23
|
+
├── node_modules/ # 项目依赖
|
|
24
|
+
├── viteMockServe/ # Mock 服务配置(用于开发环境模拟 API)
|
|
25
|
+
├── public/ # 静态资源
|
|
26
|
+
├── src/ # 源码目录
|
|
27
|
+
│ ├── components/ # Vue 组件
|
|
28
|
+
│ ├── composables/ # 组合式函数
|
|
29
|
+
│ ├── views/ # 页面视图
|
|
30
|
+
│ ├── router/ # 路由配置
|
|
31
|
+
│ ├── store/ # 状态管理
|
|
32
|
+
│ ├── utils/ # 工具函数
|
|
33
|
+
│ └── main.ts # 应用入口
|
|
34
|
+
├── index.html # HTML 入口文件
|
|
35
|
+
├── eslint.config.js # ESLint 配置文件
|
|
36
|
+
├── package.json # 项目配置(依赖、脚本等)
|
|
37
|
+
└── vite.config.ts # Vite 构建配置
|
|
38
|
+
├── tsconfig.json # TypeScript 配置
|
|
39
|
+
├── auto-imports.d.ts # 自动导入类型声明
|
|
40
|
+
├── components.d.ts # 全局组件类型声明
|
|
41
|
+
├── README.md # 项目文档
|
|
42
|
+
├── .env.example # 环境变量模板(供参考)
|
|
43
|
+
├── .env.development # 开发环境变量(全局)
|
|
44
|
+
├── .env.production # 生产环境变量(全局)
|
|
45
|
+
├── .gitignore # Git 忽略规则
|
|
46
|
+
├── .prettierrc.json # Prettier 格式化配置
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
|
package/bin/create.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url'
|
|
2
2
|
import { dirname, join, relative } from 'path'
|
|
3
|
-
import { promises as fs, existsSync } from 'fs'
|
|
3
|
+
import { promises as fs, existsSync } from 'fs'
|
|
4
4
|
import { execSync, spawnSync } from 'child_process'
|
|
5
5
|
import minimist from 'minimist'
|
|
6
6
|
import prompts from 'prompts'
|
|
@@ -37,6 +37,7 @@ function getInstallCommand(packageManager) {
|
|
|
37
37
|
function getRunCommand(packageManager, script) {
|
|
38
38
|
switch (packageManager) {
|
|
39
39
|
case 'pnpm':
|
|
40
|
+
return `${packageManager} ${script}`
|
|
40
41
|
case 'npm':
|
|
41
42
|
return `${packageManager} run ${script}`
|
|
42
43
|
case 'yarn':
|
|
@@ -68,13 +69,13 @@ async function main() {
|
|
|
68
69
|
const { name } = await prompts({
|
|
69
70
|
type: 'text',
|
|
70
71
|
name: 'name',
|
|
71
|
-
message: '
|
|
72
|
-
initial: '
|
|
72
|
+
message: '项目名称:',
|
|
73
|
+
initial: 'jnrs-app-vue',
|
|
73
74
|
validate: (input) => {
|
|
74
|
-
if (!input) return '
|
|
75
|
-
if (existsSync(input)) return '
|
|
75
|
+
if (!input) return '请输入项目名称!'
|
|
76
|
+
if (existsSync(input)) return '目录已存在!'
|
|
76
77
|
if (!isValidPackageName(input)) {
|
|
77
|
-
return '
|
|
78
|
+
return '包名称无效!请使用小写字母、连字符,不要使用特殊字符'
|
|
78
79
|
}
|
|
79
80
|
return true
|
|
80
81
|
}
|
|
@@ -84,13 +85,13 @@ async function main() {
|
|
|
84
85
|
} else {
|
|
85
86
|
// 非交互模式:校验包名和目录
|
|
86
87
|
if (!isValidPackageName(targetDir)) {
|
|
87
|
-
console.error('❌
|
|
88
|
-
console.error('
|
|
88
|
+
console.error('❌ 无效的项目名称:', targetDir)
|
|
89
|
+
console.error(' 包名称必须有效(小写、无空格等)')
|
|
89
90
|
process.exit(1)
|
|
90
91
|
}
|
|
91
92
|
if (existsSync(join(process.cwd(), targetDir))) {
|
|
92
93
|
// ✅ 同步检查
|
|
93
|
-
console.error(`❌
|
|
94
|
+
console.error(`❌ 目录 "${targetDir}" 已存在!`)
|
|
94
95
|
process.exit(1)
|
|
95
96
|
}
|
|
96
97
|
}
|
|
@@ -107,13 +108,10 @@ async function main() {
|
|
|
107
108
|
pkg.name = toValidPackageName(targetDir)
|
|
108
109
|
await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2))
|
|
109
110
|
|
|
110
|
-
// 写入 .npmrc(适配 pnpm)
|
|
111
|
-
await fs.writeFile(join(root, '.npmrc'), '# Config for pnpm\nshamefully-hoist=true\n')
|
|
112
|
-
|
|
113
111
|
// 安装依赖
|
|
114
112
|
const packageManager = detectPackageManager()
|
|
115
|
-
console.log(`\n📦
|
|
116
|
-
console.log(
|
|
113
|
+
console.log(`\n📦 检测到包管理器: ${packageManager}`)
|
|
114
|
+
console.log(`准备通过 ${packageManager} 安装依赖项中...\n`)
|
|
117
115
|
|
|
118
116
|
const [cmd, ...args] = getInstallCommand(packageManager)
|
|
119
117
|
try {
|
|
@@ -124,7 +122,7 @@ async function main() {
|
|
|
124
122
|
})
|
|
125
123
|
} catch (e) {
|
|
126
124
|
console.error(
|
|
127
|
-
`\n⚠️
|
|
125
|
+
`\n⚠️ 安装依赖项失败。请手动运行:\n cd ${relative(process.cwd(), root)} && ${cmd} ${args.join(' ')}`
|
|
128
126
|
)
|
|
129
127
|
process.exit(1)
|
|
130
128
|
}
|
|
@@ -133,13 +131,13 @@ async function main() {
|
|
|
133
131
|
const relativePath = relative(process.cwd(), root)
|
|
134
132
|
const devCmd = getRunCommand(packageManager, 'dev')
|
|
135
133
|
|
|
136
|
-
console.log(`\n✅
|
|
134
|
+
console.log(`\n✅ 项目创建成功! 👌`)
|
|
137
135
|
console.log(`\n👉 cd ${relativePath}`)
|
|
138
136
|
console.log(` ${devCmd}\n`)
|
|
139
137
|
}
|
|
140
138
|
|
|
141
139
|
main().catch((err) => {
|
|
142
140
|
console.error(`\n🚨 Error: ${err.message}`)
|
|
143
|
-
console.trace(err)
|
|
141
|
+
console.trace(err)
|
|
144
142
|
process.exit(1)
|
|
145
143
|
})
|
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# create-jnrs-template-vue
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## ✨ 介绍
|
|
4
|
+
巨能前端工程化开发,Vue 项目模板脚手架
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
#### 软件架构
|
|
8
|
-
|
|
9
|
-
Vue3、TypeScript、Vite、Pinia、Element Plus
|
|
10
|
-
|
|
11
|
-
#### 安装教程
|
|
6
|
+
## 💻 技术栈
|
|
7
|
+
TypeScript、Vue3 生态
|
|
12
8
|
|
|
9
|
+
## 🧩 安装使用说明
|
|
13
10
|
```shell
|
|
14
|
-
pnpm
|
|
11
|
+
pnpm i
|
|
12
|
+
pnpm dev
|
|
13
|
+
pnpm build
|
|
15
14
|
```
|
|
16
15
|
|
|
17
16
|
#### 项目结构
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
├──
|
|
22
|
-
├──
|
|
23
|
-
├──
|
|
24
|
-
├──
|
|
25
|
-
├──
|
|
26
|
-
├──
|
|
27
|
-
├──
|
|
28
|
-
├──
|
|
29
|
-
├──
|
|
30
|
-
├──
|
|
31
|
-
└── main.ts
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
```Text
|
|
18
|
+
jnrs-template-vue/
|
|
19
|
+
├── dist/ # 打包构建产物
|
|
20
|
+
├── node_modules/ # 项目依赖
|
|
21
|
+
├── viteMockServe/ # Mock 服务配置(用于开发环境模拟 API)
|
|
22
|
+
├── public/ # 静态资源
|
|
23
|
+
├── src/ # 源码目录
|
|
24
|
+
│ ├── components/ # Vue 组件
|
|
25
|
+
│ ├── composables/ # 组合式函数
|
|
26
|
+
│ ├── views/ # 页面视图
|
|
27
|
+
│ ├── router/ # 路由配置
|
|
28
|
+
│ ├── store/ # 状态管理
|
|
29
|
+
│ ├── utils/ # 工具函数
|
|
30
|
+
│ └── main.ts # 应用入口
|
|
31
|
+
├── index.html # HTML 入口文件
|
|
32
|
+
├── eslint.config.js # ESLint 配置文件
|
|
33
|
+
├── package.json # 项目配置(依赖、脚本等)
|
|
34
|
+
└── vite.config.ts # Vite 构建配置
|
|
35
|
+
├── tsconfig.json # TypeScript 配置
|
|
36
|
+
├── auto-imports.d.ts # 自动导入类型声明
|
|
37
|
+
├── components.d.ts # 全局组件类型声明
|
|
38
|
+
├── README.md # 项目文档
|
|
39
|
+
├── .env.example # 环境变量模板(供参考)
|
|
40
|
+
├── .env.development # 开发环境变量(全局)
|
|
41
|
+
├── .env.production # 生产环境变量(全局)
|
|
42
|
+
├── .gitignore # Git 忽略规则
|
|
43
|
+
├── .prettierrc.json # Prettier 格式化配置
|
|
44
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
2
|
+
import { dirname } from 'node:path'
|
|
3
|
+
import { globalIgnores } from 'eslint/config'
|
|
4
|
+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
5
|
+
import pluginVue from 'eslint-plugin-vue'
|
|
6
|
+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
|
7
|
+
import parser from '@typescript-eslint/parser'
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
10
|
+
const __dirname = dirname(__filename)
|
|
11
|
+
|
|
12
|
+
export default defineConfigWithVueTs(
|
|
13
|
+
{
|
|
14
|
+
name: 'app/files-to-lint',
|
|
15
|
+
files: ['**/*.{ts,mts,tsx,vue}'],
|
|
16
|
+
languageOptions: {
|
|
17
|
+
parser: parser,
|
|
18
|
+
parserOptions: {
|
|
19
|
+
tsconfigRootDir: __dirname
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
// 禁止使用 any 类型(显式和隐式)
|
|
24
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
25
|
+
'vue/multi-word-component-names': [
|
|
26
|
+
'error',
|
|
27
|
+
{
|
|
28
|
+
ignores: ['index', '403', '404']
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
'vue/block-order': ['error', { order: ['script', 'template', 'style'] }]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
|
36
|
+
|
|
37
|
+
pluginVue.configs['flat/essential'],
|
|
38
|
+
vueTsConfigs.recommended,
|
|
39
|
+
skipFormatting
|
|
40
|
+
)
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
2
|
+
"name": "jnrs-template-vue",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "JNRS 新项目模板",
|
|
5
5
|
"author": "Talia-Tan",
|
|
6
6
|
"private": true,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": "^20.19.0 || >=22.12.0"
|
|
10
10
|
},
|
|
11
|
-
"bin": {
|
|
12
|
-
"create-jnrs-template-vue": "create.js"
|
|
13
|
-
},
|
|
14
11
|
"scripts": {
|
|
15
12
|
"dev": "vite",
|
|
16
13
|
"build": "run-p type-check \"build-only {@}\" --",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-jnrs-template-vue",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "巨能前端工程化开发,Vue 项目模板脚手架",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
7
7
|
"vite",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"monorepo"
|
|
11
11
|
],
|
|
12
12
|
"author": "Talia-Tan",
|
|
13
|
-
"license": "
|
|
13
|
+
"license": "MIT",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "https://gitee.com/jnrs_git/jnrs-monorepo-frontend.git"
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"bin",
|
|
24
|
-
"jnrs-template-vue"
|
|
24
|
+
"jnrs-template-vue",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
25
27
|
],
|
|
26
28
|
"engines": {
|
|
27
29
|
"node": ">=20.0.0",
|
|
@@ -33,6 +35,6 @@
|
|
|
33
35
|
"fs-extra": "^11.2.0"
|
|
34
36
|
},
|
|
35
37
|
"scripts": {
|
|
36
|
-
"release": "node ./
|
|
38
|
+
"release": "node ./scripts/release.mjs"
|
|
37
39
|
}
|
|
38
40
|
}
|
package/bin/release.mjs
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : release.mjs
|
|
5
|
-
* @Date : 2025/11/12
|
|
6
|
-
* @Desc. : 发布脚本:自动化版本更新、发布及提交
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { execSync } from 'node:child_process'
|
|
10
|
-
import fs from 'node:fs/promises'
|
|
11
|
-
import path from 'node:path'
|
|
12
|
-
import { fileURLToPath } from 'node:url'
|
|
13
|
-
|
|
14
|
-
function run(cmd, options = {}) {
|
|
15
|
-
console.log(`> ${cmd}`)
|
|
16
|
-
try {
|
|
17
|
-
const result = execSync(cmd, {
|
|
18
|
-
stdio: ['pipe', 'pipe', 'pipe'], // 关键:捕获 stderr
|
|
19
|
-
...options
|
|
20
|
-
})
|
|
21
|
-
return result.toString().trim()
|
|
22
|
-
} catch (e) {
|
|
23
|
-
// 提取 stderr 和 stdout
|
|
24
|
-
const stderr = e.stderr?.toString().trim() || ''
|
|
25
|
-
const stdout = e.stdout?.toString().trim() || ''
|
|
26
|
-
const fullError = [stderr, stdout].filter(Boolean).join('\n') || e.message
|
|
27
|
-
throw new Error(fullError)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function hasUncommittedChanges() {
|
|
32
|
-
const status = run('git status --porcelain --ignore-submodules=all .')
|
|
33
|
-
return status.length > 0
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function incrementPatchVersion(version) {
|
|
37
|
-
const [major, minor, patch] = version.split('.').map(Number)
|
|
38
|
-
return `${major}.${minor}.${patch + 1}`
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
42
|
-
const pkgPath = path.resolve(__dirname, '..', 'package.json')
|
|
43
|
-
// 新增:模板 package.json 路径
|
|
44
|
-
const templatePkgPath = path.resolve(__dirname, '..', 'jnrs-template-vue', 'package.json')
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
// 读取原始 package.json
|
|
48
|
-
const pkgContent = await fs.readFile(pkgPath, 'utf8')
|
|
49
|
-
const pkg = JSON.parse(pkgContent)
|
|
50
|
-
const originalVersion = pkg.version
|
|
51
|
-
|
|
52
|
-
console.log(`📦 当前包: ${pkg.name}@${originalVersion}`)
|
|
53
|
-
|
|
54
|
-
if (hasUncommittedChanges()) {
|
|
55
|
-
console.error('❌ 有未提交的更改,请先提交或暂存更改!')
|
|
56
|
-
process.exit(1)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// ========== 新增逻辑开始:处理 jnrs-template-vue/package.json ==========
|
|
60
|
-
console.log('📦🔧 正在处理模板包 jnrs-template-vue/package.json...')
|
|
61
|
-
|
|
62
|
-
// 1. 读取模板 package.json
|
|
63
|
-
const templatePkgContent = await fs.readFile(templatePkgPath, 'utf8')
|
|
64
|
-
const templatePkg = JSON.parse(templatePkgContent)
|
|
65
|
-
const originalTemplateVersion = templatePkg.version
|
|
66
|
-
let hasModifiedTemplate = false
|
|
67
|
-
|
|
68
|
-
try {
|
|
69
|
-
// 2. 替换所有 "workspace:*" 为 "*"
|
|
70
|
-
const replaceWorkspaceRefs = (obj) => {
|
|
71
|
-
for (const key in obj) {
|
|
72
|
-
if (typeof obj[key] === 'string' && obj[key] === 'workspace:*') {
|
|
73
|
-
obj[key] = '*'
|
|
74
|
-
} else if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
75
|
-
replaceWorkspaceRefs(obj[key])
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// 执行替换
|
|
81
|
-
replaceWorkspaceRefs(templatePkg.dependencies || {})
|
|
82
|
-
replaceWorkspaceRefs(templatePkg.devDependencies || {})
|
|
83
|
-
replaceWorkspaceRefs(templatePkg.optionalDependencies || {})
|
|
84
|
-
hasModifiedTemplate = true
|
|
85
|
-
|
|
86
|
-
// 3. version +1
|
|
87
|
-
templatePkg.version = incrementPatchVersion(originalTemplateVersion)
|
|
88
|
-
|
|
89
|
-
// 4. 写入修改后的模板 package.json
|
|
90
|
-
await fs.writeFile(templatePkgPath, JSON.stringify(templatePkg, null, 2) + '\n')
|
|
91
|
-
console.log(`📦 模板包版本已更新至 ${templatePkg.version},workspace:* 已替换为 *`)
|
|
92
|
-
} catch (err) {
|
|
93
|
-
// 回滚模板修改
|
|
94
|
-
console.log('↩️ 正在回滚 jnrs-template-vue/package.json 的修改...')
|
|
95
|
-
try {
|
|
96
|
-
if (hasModifiedTemplate) {
|
|
97
|
-
// 恢复 workspace:* 和原始 version
|
|
98
|
-
const rollbackPkg = JSON.parse(templatePkgContent)
|
|
99
|
-
await fs.writeFile(templatePkgPath, JSON.stringify(rollbackPkg, null, 2) + '\n')
|
|
100
|
-
}
|
|
101
|
-
} catch (e2) {
|
|
102
|
-
console.error('❌ 回滚模板文件时出错:', e2.message)
|
|
103
|
-
}
|
|
104
|
-
throw new Error(`处理模板包失败: ${err.message}`)
|
|
105
|
-
}
|
|
106
|
-
// ========== 新增逻辑结束 ==========
|
|
107
|
-
|
|
108
|
-
// 手动计算新版本(主包)
|
|
109
|
-
const newVersion = incrementPatchVersion(originalVersion)
|
|
110
|
-
console.log(`🆕 新版本: ${newVersion}`)
|
|
111
|
-
|
|
112
|
-
// 写入新版本(主包)
|
|
113
|
-
pkg.version = newVersion
|
|
114
|
-
await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2) + '\n')
|
|
115
|
-
|
|
116
|
-
// 尝试发布
|
|
117
|
-
let published = false
|
|
118
|
-
try {
|
|
119
|
-
console.log('🚀 正在发布到 npm...')
|
|
120
|
-
run('pnpm publish --no-git-checks')
|
|
121
|
-
published = true
|
|
122
|
-
} catch (err) {
|
|
123
|
-
console.error('❌ npm 发布失败:', err.message)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (published) {
|
|
127
|
-
try {
|
|
128
|
-
console.log('💾 正在提交版本变更...')
|
|
129
|
-
run('git add package.json')
|
|
130
|
-
run(`git add ${templatePkgPath.replace(/\\/g, '/')}`) // 确保路径兼容 Windows
|
|
131
|
-
const commitMsg = `🅒🅘🅒🅓 ${pkg.name}@${newVersion} 发布成功!👌`
|
|
132
|
-
run(`git commit -m "${commitMsg}"`)
|
|
133
|
-
console.log(`\n✅ 包 ${pkg.name} 发布流程已完成!🎉🎉🎉`)
|
|
134
|
-
} catch (err) {
|
|
135
|
-
console.error('⚠️ 提交失败,但发布已成功。请手动提交 package.json 和模板包:', err.message)
|
|
136
|
-
console.log(`\n✅ 包 ${pkg.name} 发布流程已完成!🎉🎉🎉`)
|
|
137
|
-
}
|
|
138
|
-
} else {
|
|
139
|
-
// 回滚主包
|
|
140
|
-
console.log('↩️ 正在回滚主包 version 修改...')
|
|
141
|
-
pkg.version = originalVersion
|
|
142
|
-
await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2) + '\n')
|
|
143
|
-
|
|
144
|
-
// 回滚模板包
|
|
145
|
-
console.log('↩️ 正在回滚模板包修改...')
|
|
146
|
-
await fs.writeFile(templatePkgPath, templatePkgContent)
|
|
147
|
-
|
|
148
|
-
console.log('📦 已还原 package.json 和模板包到原始状态')
|
|
149
|
-
process.exit(1)
|
|
150
|
-
}
|
|
151
|
-
} catch (err) {
|
|
152
|
-
console.error('💥 脚本执行出错:', err.message)
|
|
153
|
-
process.exit(1)
|
|
154
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./base-CmE9WEcf.js";import{E as r}from"./el-button-5iH8Z9fP.js";import{d as s,c as x,o as c,a as z,b as t,w as e,e as m,u as l,O as A,r as v}from"./index-ZWYb22SS.js";import{_ as f}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./@jnrs/core-BU1kTVoG.js";const j="data:image/png;base64,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",d={class:"main"},y={class:"main_mid"},N={class:"main_mid_btn"},P=s({__name:"403",setup(Y){const i=l(),Z=()=>{A({name:"Login",query:{redirect:i.fullPath}},"replace")},M=()=>{A({path:"/"},"replace")},a=()=>{v.back()};return(O,n)=>{const o=r;return c(),x("div",d,[z("div",y,[n[3]||(n[3]=z("img",{alt:"404",src:j},null,-1)),n[4]||(n[4]=z("h3",null,"抱歉,您访问的资源权限受限",-1)),z("div",N,[t(o,{onClick:Z,style:{"margin-right":"20px"}},{default:e(()=>[...n[0]||(n[0]=[m("重新登录",-1)])]),_:1}),t(o,{type:"primary",plain:"",onClick:M,style:{"margin-right":"20px"}},{default:e(()=>[...n[1]||(n[1]=[m(" 返回首页 ",-1)])]),_:1}),t(o,{type:"primary",onClick:a},{default:e(()=>[...n[2]||(n[2]=[m("返回上一页",-1)])]),_:1})])])])}}}),D=f(P,[["__scopeId","data-v-aef8e9f5"]]);export{D as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.main[data-v-aef8e9f5]{display:flex;align-items:center;justify-content:center;width:100%;height:100vh;background:#f9fafe;overflow:hidden}.main .main_mid[data-v-aef8e9f5]{text-align:center}.main .main_mid img[data-v-aef8e9f5]{width:300px}.main .main_mid h3[data-v-aef8e9f5]{color:#2a63a4}.main .main_mid .main_mid_btn[data-v-aef8e9f5]{margin-top:30px}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.main[data-v-44041873]{display:flex;align-items:center;justify-content:center;width:100%;height:100vh;background:#f9fafe;overflow:hidden}.main .main_mid[data-v-44041873]{text-align:center}.main .main_mid img[data-v-44041873]{width:300px}.main .main_mid h3[data-v-44041873]{color:#2a63a4}.main .main_mid .main_mid_btn[data-v-44041873]{margin-top:30px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./base-CmE9WEcf.js";import{E as _}from"./el-button-5iH8Z9fP.js";import{d,c as u,o as c,a as o,b as e,w as n,e as r,u as f,O as a,r as g}from"./index-ZWYb22SS.js";import{_ as k}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./@jnrs/core-BU1kTVoG.js";const x="/assets/404-BqrrbZGC.png",y={class:"main"},B={class:"main_mid"},C={class:"main_mid_btn"},b=d({__name:"404",setup(v){const i=f(),l=()=>{a({name:"Login",query:{redirect:i.fullPath}},"replace")},m=()=>{a({path:"/"},"replace")},p=()=>{g.back()};return(E,t)=>{const s=_;return c(),u("div",y,[o("div",B,[t[3]||(t[3]=o("img",{alt:"404",src:x},null,-1)),t[4]||(t[4]=o("h3",null,"抱歉,您访问的页面不存在",-1)),o("div",C,[e(s,{onClick:l,style:{"margin-right":"20px"}},{default:n(()=>[...t[0]||(t[0]=[r("重新登录",-1)])]),_:1}),e(s,{type:"primary",plain:"",onClick:m,style:{"margin-right":"20px"}},{default:n(()=>[...t[1]||(t[1]=[r(" 返回首页 ",-1)])]),_:1}),e(s,{type:"primary",onClick:p},{default:n(()=>[...t[2]||(t[2]=[r("返回上一页",-1)])]),_:1})])])])}}}),G=k(b,[["__scopeId","data-v-44041873"]]);export{G as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
function Ve(e,t){return function(){return e.apply(t,arguments)}}const{toString:yt}=Object.prototype,{getPrototypeOf:we}=Object,{iterator:re,toStringTag:We}=Symbol,se=(e=>t=>{const n=yt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=e=>(e=e.toLowerCase(),t=>se(t)===e),oe=e=>t=>typeof t===e,{isArray:M}=Array,I=oe("undefined");function V(e){return e!==null&&!I(e)&&e.constructor!==null&&!I(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ke=N("ArrayBuffer");function wt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ke(e.buffer),t}const bt=oe("string"),T=oe("function"),ve=oe("number"),W=e=>e!==null&&typeof e=="object",Et=e=>e===!0||e===!1,Y=e=>{if(se(e)!=="object")return!1;const t=we(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(We in e)&&!(re in e)},gt=e=>{if(!W(e)||V(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},St=N("Date"),Rt=N("File"),Ot=N("Blob"),Tt=N("FileList"),At=e=>W(e)&&T(e.pipe),Ct=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=se(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},xt=N("URLSearchParams"),[Pt,Nt,_t,Ut]=["ReadableStream","Request","Response","Headers"].map(N),Ft=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),M(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(V(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Xe(e,t){if(V(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const k=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ge=e=>!I(e)&&e!==k;function pe(){const{caseless:e,skipUndefined:t}=Ge(this)&&this||{},n={},r=(s,i)=>{const o=e&&Xe(n,i)||i;Y(n[o])&&Y(s)?n[o]=pe(n[o],s):Y(s)?n[o]=pe({},s):M(s)?n[o]=s.slice():(!t||!I(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&K(arguments[s],r);return n}const Lt=(e,t,n,{allOwnKeys:r}={})=>(K(t,(s,i)=>{n&&T(s)?e[i]=Ve(s,n):e[i]=s},{allOwnKeys:r}),e),Dt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},kt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&we(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},qt=e=>{if(!e)return null;if(M(e))return e;let t=e.length;if(!ve(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ht=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&we(Uint8Array)),It=(e,t)=>{const r=(e&&e[re]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Mt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$t=N("HTMLFormElement"),zt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jt=N("RegExp"),Qe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};K(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},Vt=e=>{Qe(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wt=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return M(e)?r(e):r(String(e).split(t)),n},Kt=()=>{},vt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Xt(e){return!!(e&&T(e.append)&&e[We]==="FormData"&&e[re])}const Gt=e=>{const t=new Array(10),n=(r,s)=>{if(W(r)){if(t.indexOf(r)>=0)return;if(V(r))return r;if(!("toJSON"in r)){t[s]=r;const i=M(r)?[]:{};return K(r,(o,c)=>{const u=n(o,s+1);!I(u)&&(i[c]=u)}),t[s]=void 0,i}}return r};return n(e,0)},Qt=N("AsyncFunction"),Zt=e=>e&&(W(e)||T(e))&&T(e.then)&&T(e.catch),Ze=((e,t)=>e?setImmediate:t?((n,r)=>(k.addEventListener("message",({source:s,data:i})=>{s===k&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),k.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(k.postMessage)),Yt=typeof queueMicrotask<"u"?queueMicrotask.bind(k):typeof process<"u"&&process.nextTick||Ze,en=e=>e!=null&&T(e[re]),a={isArray:M,isArrayBuffer:Ke,isBuffer:V,isFormData:Ct,isArrayBufferView:wt,isString:bt,isNumber:ve,isBoolean:Et,isObject:W,isPlainObject:Y,isEmptyObject:gt,isReadableStream:Pt,isRequest:Nt,isResponse:_t,isHeaders:Ut,isUndefined:I,isDate:St,isFile:Rt,isBlob:Ot,isRegExp:Jt,isFunction:T,isStream:At,isURLSearchParams:xt,isTypedArray:Ht,isFileList:Tt,forEach:K,merge:pe,extend:Lt,trim:Ft,stripBOM:Dt,inherits:Bt,toFlatObject:kt,kindOf:se,kindOfTest:N,endsWith:jt,toArray:qt,forEachEntry:It,matchAll:Mt,isHTMLForm:$t,hasOwnProperty:xe,hasOwnProp:xe,reduceDescriptors:Qe,freezeMethods:Vt,toObjectSet:Wt,toCamelCase:zt,noop:Kt,toFiniteNumber:vt,findKey:Xe,global:k,isContextDefined:Ge,isSpecCompliantForm:Xt,toJSONObject:Gt,isAsyncFn:Qt,isThenable:Zt,setImmediate:Ze,asap:Yt,isIterable:en};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ye=y.prototype,et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{et[e]={value:e}});Object.defineProperties(y,et);Object.defineProperty(Ye,"isAxiosError",{value:!0});y.from=(e,t,n,r,s,i)=>{const o=Object.create(Ye);a.toFlatObject(e,o,function(f){return f!==Error.prototype},l=>l!=="isAxiosError");const c=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return y.call(o,c,u,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const tn=null;function he(e){return a.isPlainObject(e)||a.isArray(e)}function tt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,n){return e?e.concat(t).map(function(s,i){return s=tt(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function nn(e){return a.isArray(e)&&!e.some(he)}const rn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ie(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||f,i=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!u&&a.isBlob(d))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,m,p){let g=d;if(d&&!p&&typeof d=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&nn(d)||(a.isFileList(d)||a.endsWith(m,"[]"))&&(g=a.toArray(d)))return m=tt(m),g.forEach(function(S,O){!(a.isUndefined(S)||S===null)&&t.append(o===!0?Pe([m],O,i):o===null?m:m+"[]",l(S))}),!1}return he(d)?!0:(t.append(Pe(p,m,i),l(d)),!1)}const h=[],w=Object.assign(rn,{defaultVisitor:f,convertValue:l,isVisitable:he});function E(d,m){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(d),a.forEach(d,function(g,C){(!(a.isUndefined(g)||g===null)&&s.call(t,g,a.isString(C)?C.trim():C,m,w))===!0&&E(g,m?m.concat(C):[C])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function be(e,t){this._pairs=[],e&&ie(e,this,t)}const nt=be.prototype;nt.append=function(t,n){this._pairs.push([t,n])};nt.toString=function(t){const n=t?function(r){return t.call(this,r,Ne)}:Ne;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function sn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rt(e,t,n){if(!t)return e;const r=n&&n.encode||sn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new be(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class _e{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},on=typeof URLSearchParams<"u"?URLSearchParams:be,an=typeof FormData<"u"?FormData:null,cn=typeof Blob<"u"?Blob:null,un={isBrowser:!0,classes:{URLSearchParams:on,FormData:an,Blob:cn},protocols:["http","https","file","blob","url","data"]},Ee=typeof window<"u"&&typeof document<"u",me=typeof navigator=="object"&&navigator||void 0,ln=Ee&&(!me||["ReactNative","NativeScript","NS"].indexOf(me.product)<0),fn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dn=Ee&&window.location.href||"http://localhost",pn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ee,hasStandardBrowserEnv:ln,hasStandardBrowserWebWorkerEnv:fn,navigator:me,origin:dn},Symbol.toStringTag,{value:"Module"})),R={...pn,...un};function hn(e,t){return ie(e,new R.classes.URLSearchParams,{visitor:function(n,r,s,i){return R.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function mn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function ot(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),u=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,u?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=yn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(mn(r),s,n,0)}),n}return null}function wn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const v={transitional:st,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(ot(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return hn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ie(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),wn(t)):t}],transformResponse:[function(t){const n=this.transitional||v.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{v.headers[e]={}});const bn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),En=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&bn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ue=Symbol("internals");function J(e){return e&&String(e).trim().toLowerCase()}function ee(e){return e===!1||e==null?e:a.isArray(e)?e.map(ee):String(e)}function gn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Sn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function le(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Rn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function On(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let A=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,u,l){const f=J(u);if(!f)throw new Error("header name must be a non-empty string");const h=a.findKey(s,f);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||u]=ee(c))}const o=(c,u)=>a.forEach(c,(l,f)=>i(l,f,u));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!Sn(t))o(En(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},u,l;for(const f of t){if(!a.isArray(f))throw TypeError("Object iterator must return a key-value pair");c[l=f[0]]=(u=c[l])?a.isArray(u)?[...u,f[1]]:[u,f[1]]:f[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=J(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return gn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=J(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=J(o),o){const c=a.findKey(r,o);c&&(!n||le(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||le(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=ee(s),delete n[i];return}const c=t?Rn(i):String(i).trim();c!==i&&delete n[i],n[c]=ee(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Ue]=this[Ue]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=J(o);r[c]||(On(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};A.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(A.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(A);function fe(e,t){const n=this||v,r=t||n,s=A.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function it(e){return!!(e&&e.__CANCEL__)}function $(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits($,y,{__CANCEL__:!0});function at(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function An(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),f=r[i];o||(o=l),n[s]=u,r[s]=l;let h=i,w=0;for(;h!==s;)w+=n[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const E=f&&l-f;return E?Math.round(w*1e3/E):void 0}}function Cn(e,t){let n=0,r=1e3/t,s,i;const o=(l,f=Date.now())=>{n=f,s=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const f=Date.now(),h=f-n;h>=r?o(l,f):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const ne=(e,t,n=3)=>{let r=0;const s=An(50,250);return Cn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,u=o-r,l=s(u),f=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:u,rate:l||void 0,estimated:l&&c&&f?(c-o)/l:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},Fe=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Le=e=>(...t)=>a.asap(()=>e(...t)),xn=R.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,R.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0,Pn=R.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Nn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _n(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ct(e,t,n){let r=!Nn(t);return e&&(r||n==!1)?_n(e,t):t}const De=e=>e instanceof A?{...e}:e;function q(e,t){t=t||{};const n={};function r(l,f,h,w){return a.isPlainObject(l)&&a.isPlainObject(f)?a.merge.call({caseless:w},l,f):a.isPlainObject(f)?a.merge({},f):a.isArray(f)?f.slice():f}function s(l,f,h,w){if(a.isUndefined(f)){if(!a.isUndefined(l))return r(void 0,l,h,w)}else return r(l,f,h,w)}function i(l,f){if(!a.isUndefined(f))return r(void 0,f)}function o(l,f){if(a.isUndefined(f)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function c(l,f,h){if(h in t)return r(l,f);if(h in e)return r(void 0,l)}const u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,f,h)=>s(De(l),De(f),h,!0)};return a.forEach(Object.keys({...e,...t}),function(f){const h=u[f]||s,w=h(e[f],t[f],f);a.isUndefined(w)&&h!==c||(n[f]=w)}),n}const ut=e=>{const t=q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;if(t.headers=o=A.from(o),t.url=rt(ct(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const u=n.getHeaders(),l=["content-type","content-length"];Object.entries(u).forEach(([f,h])=>{l.includes(f.toLowerCase())&&o.set(f,h)})}}if(R.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&xn(t.url))){const u=s&&i&&Pn.read(i);u&&o.set(s,u)}return t},Un=typeof XMLHttpRequest<"u",Fn=Un&&function(e){return new Promise(function(n,r){const s=ut(e);let i=s.data;const o=A.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:l}=s,f,h,w,E,d;function m(){E&&E(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function g(){if(!p)return;const S=A.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};at(function(x){n(x),m()},function(x){r(x),m()},P),p=null}"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(r(new y("Request aborted",y.ECONNABORTED,e,p)),p=null)},p.onerror=function(O){const P=O&&O.message?O.message:"Network Error",D=new y(P,y.ERR_NETWORK,e,p);D.event=O||null,r(D),p=null},p.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||st;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new y(O,P.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&a.forEach(o.toJSON(),function(O,P){p.setRequestHeader(P,O)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),l&&([w,d]=ne(l,!0),p.addEventListener("progress",w)),u&&p.upload&&([h,E]=ne(u),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(f=S=>{p&&(r(!S||S.type?new $(null,e,p):S),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const C=Tn(s.url);if(C&&R.protocols.indexOf(C)===-1){r(new y("Unsupported protocol "+C+":",y.ERR_BAD_REQUEST,e));return}p.send(i||null)})},Ln=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const f=l instanceof Error?l:this.reason;r.abort(f instanceof y?f:new $(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>a.asap(c),u}},Dn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Bn=async function*(e,t){for await(const n of kn(e))yield*Dn(n,t)},kn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Be=(e,t,n,r)=>{const s=Bn(e,t);let i=0,o,c=u=>{o||(o=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:f}=await s.next();if(l){c(),u.close();return}let h=f.byteLength;if(n){let w=i+=h;n(w)}u.enqueue(new Uint8Array(f))}catch(l){throw c(l),l}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},ke=64*1024,{isFunction:Z}=a,jn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:je,TextEncoder:qe}=a.global,He=(e,...t)=>{try{return!!e(...t)}catch{return!1}},qn=e=>{e=a.merge.call({skipUndefined:!0},jn,e);const{fetch:t,Request:n,Response:r}=e,s=t?Z(t):typeof fetch=="function",i=Z(n),o=Z(r);if(!s)return!1;const c=s&&Z(je),u=s&&(typeof qe=="function"?(d=>m=>d.encode(m))(new qe):async d=>new Uint8Array(await new n(d).arrayBuffer())),l=i&&c&&He(()=>{let d=!1;const m=new n(R.origin,{body:new je,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!m}),f=o&&c&&He(()=>a.isReadableStream(new r("").body)),h={stream:f&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(m,p)=>{let g=m&&m[d];if(g)return g.call(m);throw new y(`Response type '${d}' is not supported`,y.ERR_NOT_SUPPORT,p)})});const w=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new n(R.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await u(d)).byteLength},E=async(d,m)=>{const p=a.toFiniteNumber(d.getContentLength());return p??w(m)};return async d=>{let{url:m,method:p,data:g,signal:C,cancelToken:S,timeout:O,onDownloadProgress:P,onUploadProgress:D,responseType:x,headers:ce,withCredentials:X="same-origin",fetchOptions:Se}=ut(d),Re=t||fetch;x=x?(x+"").toLowerCase():"text";let G=Ln([C,S&&S.toAbortSignal()],O),z=null;const B=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let Oe;try{if(D&&l&&p!=="get"&&p!=="head"&&(Oe=await E(ce,g))!==0){let L=new n(m,{method:"POST",body:g,duplex:"half"}),H;if(a.isFormData(g)&&(H=L.headers.get("content-type"))&&ce.setContentType(H),L.body){const[ue,Q]=Fe(Oe,ne(Le(D)));g=Be(L.body,ke,ue,Q)}}a.isString(X)||(X=X?"include":"omit");const _=i&&"credentials"in n.prototype,Te={...Se,signal:G,method:p.toUpperCase(),headers:ce.normalize().toJSON(),body:g,duplex:"half",credentials:_?X:void 0};z=i&&new n(m,Te);let F=await(i?Re(z,Se):Re(m,Te));const Ae=f&&(x==="stream"||x==="response");if(f&&(P||Ae&&B)){const L={};["status","statusText","headers"].forEach(Ce=>{L[Ce]=F[Ce]});const H=a.toFiniteNumber(F.headers.get("content-length")),[ue,Q]=P&&Fe(H,ne(Le(P),!0))||[];F=new r(Be(F.body,ke,ue,()=>{Q&&Q(),B&&B()}),L)}x=x||"text";let mt=await h[a.findKey(h,x)||"text"](F,d);return!Ae&&B&&B(),await new Promise((L,H)=>{at(L,H,{data:mt,headers:A.from(F.headers),status:F.status,statusText:F.statusText,config:d,request:z})})}catch(_){throw B&&B(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,d,z),{cause:_.cause||_}):y.from(_,_&&_.code,d,z)}}},Hn=new Map,lt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,c=o,u,l,f=Hn;for(;c--;)u=i[c],l=f.get(u),l===void 0&&f.set(u,l=c?new Map:qn(t)),f=l;return l};lt();const ge={http:tn,xhr:Fn,fetch:{get:lt}};a.forEach(ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ie=e=>`- ${e}`,In=e=>a.isFunction(e)||e===null||e===!1;function Mn(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let c;if(s=r,!In(r)&&(s=ge[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([u,l])=>`adapter ${u} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since :
|
|
4
|
-
`+o.map(Ie).join(`
|
|
5
|
-
`):" "+Ie(o[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const ft={getAdapter:Mn,adapters:ge};function de(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $(null,e)}function Me(e){return de(e),e.headers=A.from(e.headers),e.data=fe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ft.getAdapter(e.adapter||v.adapter,e)(e).then(function(r){return de(e),r.data=fe.call(e,e.transformResponse,r),r.headers=A.from(r.headers),r},function(r){return it(r)||(de(e),r&&r.response&&(r.response.data=fe.call(e,e.transformResponse,r.response),r.response.headers=A.from(r.response.headers))),Promise.reject(r)})}const dt="1.13.2",ae={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ae[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $e={};ae.transitional=function(t,n,r){function s(i,o){return"[Axios v"+dt+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!$e[o]&&($e[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};ae.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function $n(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],u=c===void 0||o(c,i,e);if(u!==!0)throw new y("option "+i+" must be "+u,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const te={assertOptions:$n,validators:ae},U=te.validators;let j=class{constructor(t){this.defaults=t||{},this.interceptors={request:new _e,response:new _e}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&te.assertOptions(r,{silentJSONParsing:U.transitional(U.boolean),forcedJSONParsing:U.transitional(U.boolean),clarifyTimeoutError:U.transitional(U.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:te.assertOptions(s,{encode:U.function,serialize:U.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),te.assertOptions(n,{baseUrl:U.spelling("baseURL"),withXsrfToken:U.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=A.concat(o,i);const c=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let f,h=0,w;if(!u){const d=[Me.bind(this),void 0];for(d.unshift(...c),d.push(...l),w=d.length,f=Promise.resolve(n);h<w;)f=f.then(d[h++],d[h++]);return f}w=c.length;let E=n;for(;h<w;){const d=c[h++],m=c[h++];try{E=d(E)}catch(p){m.call(this,p);break}}try{f=Me.call(this,E)}catch(d){return Promise.reject(d)}for(h=0,w=l.length;h<w;)f=f.then(l[h++],l[h++]);return f}getUri(t){t=q(this.defaults,t);const n=ct(t.baseURL,t.url,t.allowAbsoluteUrls);return rt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){j.prototype[t]=function(n,r){return this.request(q(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(q(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}j.prototype[t]=n(),j.prototype[t+"Form"]=n(!0)});let zn=class pt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new $(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pt(function(s){t=s}),cancel:t}}};function Jn(e){return function(n){return e.apply(null,n)}}function Vn(e){return a.isObject(e)&&e.isAxiosError===!0}const ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ye).forEach(([e,t])=>{ye[t]=e});function ht(e){const t=new j(e),n=Ve(j.prototype.request,t);return a.extend(n,j.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ht(q(e,s))},n}const b=ht(v);b.Axios=j;b.CanceledError=$;b.CancelToken=zn;b.isCancel=it;b.VERSION=dt;b.toFormData=ie;b.AxiosError=y;b.Cancel=b.CanceledError;b.all=function(t){return Promise.all(t)};b.spread=Jn;b.isAxiosError=Vn;b.mergeConfig=q;b.AxiosHeaders=A;b.formToJSON=e=>ot(a.isHTMLForm(e)?new FormData(e):e);b.getAdapter=ft.getAdapter;b.HttpStatusCode=ye;b.default=b;const{Axios:Yn,AxiosError:er,CanceledError:tr,isCancel:nr,CancelToken:rr,VERSION:sr,all:or,Cancel:ir,isAxiosError:ar,spread:cr,toFormData:ur,AxiosHeaders:lr,HttpStatusCode:fr,formToJSON:dr,getAdapter:pr,mergeConfig:hr}=b,Wn={0:"SUCCESS",3:"NO_AUTH"},ze={400:"客户端请求有误,请检查请求格式、参数、路径等配置",401:"登录状态失效,请重新登录",403:"无权限访问该资源,请检查权限配置",404:"请求的资源在服务器上不存在",500:"服务器内部错误,请联系管理员",501:"服务器不支持请求的功能",502:"网关错误,请检查代理服务器",503:"服务器暂时过载或维护,请稍后重试",504:"网关超时,请稍后重试",505:"服务器不支持请求的 HTTP 版本",506:"服务器不支持请求的 HTTP 升级版本",507:"服务器无法处理请求,请稍后重试"},Kn={baseURL:"",timeout:6e4,showErrorMsg:!0,headers:{"Content-Type":"application/x-www-form-urlencoded"}},vn=()=>null,Je=()=>{},mr=({options:e,responseMap:t,handleMessageFn:n=Je,handleGetTokenFn:r=vn,handleNoAuthFn:s=Je})=>{const i={...Kn,...e},o={...Wn,...t},c=b.create(i);return c.interceptors.request.use(u=>{if(["get","delete","head"].includes(u.method?.toLowerCase()||"")&&(u.params={...u.data,...u.params},delete u.data),u.noAuth===!0)return u;const l=r();return l?(u.headers.Authorization=`Bearer ${l}`,u):(s(),u.showErrorMsg&&n({message:"无可用 token,或将请求头中添加 noAuth=true 参数可忽略此错误",type:"error",grouping:!0,duration:5e3,showClose:!0}),Promise.reject({message:"无可用 token,或将请求头中添加 noAuth=true 参数可忽略此错误"}))},u=>(n({message:"请求错误",type:"warning",grouping:!0,duration:5e3,showClose:!0}),Promise.reject(u))),c.interceptors.response.use(u=>{if(!Xn(u.data)&&!Gn(u.data))return u.data;const{code:l,data:f,msg:h}=u.data;return o[l]==="SUCCESS"?f:(o[l]==="NO_AUTH"&&s(),u.config.showErrorMsg&&n({message:h||"业务异常,请稍后重试",type:"warning",grouping:!0,duration:5e3,showClose:!0}),Promise.reject(u.data))},u=>{let l="",f="",h="";if(!u.response)u.code==="ECONNABORTED"?l=`请求超时(${i.timeout}ms),请重试`:u.code==="ERR_INVALID_URL"?l="请求地址错误,请检查后重试":l=`网络异常:${u.message||u.code||"未知错误"}`;else{const{status:w,statusText:E}=u.response;if(f=String(w),h=E,w in ze?l=ze[w]:l=`${w} ${E}`,w===401&&s(),u.config?.responseType==="blob")return u.response}return u.config?.showErrorMsg&&n({message:l,type:"error",grouping:!0,duration:5e3,showClose:!0}),Promise.reject({fillUrl:u.config?.baseURL+u.config?.url,message:l,code:u.code,status:f,statusText:h,response:u.response})}),c};function Xn(e){return e&&typeof e=="object"&&"code"in e&&"msg"in e}function Gn(e){const t=["<html>","<!DOCTYPE","<!doctype"];if(typeof e!="string")return!1;const n=e;return t.some(r=>n.includes(r))}export{mr as c};
|