color-star-custom-methods 0.0.30 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/es/index.mjs +557 -707
  2. package/lib/index.js +2 -2
  3. package/package.json +2 -2
package/es/index.mjs CHANGED
@@ -1,713 +1,563 @@
1
- import { ref as R, computed as P, onMounted as O, onUnmounted as D, markRaw as S } from "vue";
2
- import U from "axios";
3
- import j from "qs";
4
- import $ from "js-yaml";
5
- import { ElMessage as y, ElMessageBox as M } from "element-plus";
6
- import { fetchEventSource as H } from "@microsoft/fetch-event-source";
7
- import { IconClose as N, IconBasicWarn as z, IconBasicError as K, IconBasicSuccess as W } from "color-message-lingyun-vue";
8
- const x = 1, Y = (e = 0.9) => {
9
- const a = window.innerWidth, s = window.innerHeight, l = a === 1920, r = l ? x : a / 1920, t = l ? x : s / 1080, i = Math.min(r, t);
10
- return Math.max(e, i);
11
- }, se = (e = {}) => {
12
- const { minScale: o = 0.9, enableZoomPrevention: n = !1 } = e, a = R(x), s = () => {
13
- a.value = Y(o), document.documentElement.style.setProperty(
14
- "--app-scale",
15
- a.value.toString()
16
- );
17
- }, l = (c) => {
18
- if ((c.ctrlKey || c.metaKey) && (c.key === "+" || c.key === "-" || c.key === "=" || c.key === "0")) {
19
- c.preventDefault();
20
- return;
21
- }
22
- if (c.ctrlKey && c.type === "wheel") {
23
- c.preventDefault();
24
- return;
25
- }
26
- }, r = (c) => {
27
- c.touches && c.touches.length > 1 && c.preventDefault();
28
- }, t = (c) => {
29
- c.preventDefault();
30
- }, i = P(() => {
31
- const c = a.value !== x;
32
- return {
33
- transform: `scale(${a.value})`,
34
- transformOrigin: "top left",
35
- position: c ? "fixed" : "relative",
36
- width: `calc(100% / ${a.value})`,
37
- height: `calc(100% / ${a.value})`,
38
- ...c && {
39
- top: "0",
40
- left: "0"
41
- }
42
- };
43
- }), d = P(() => ({
44
- "app-container": a.value !== x
45
- })), p = () => {
46
- if (typeof document > "u") return;
47
- const c = "page-zoom-controller-styles";
48
- let m = document.getElementById(c);
49
- m || (m = document.createElement("style"), m.id = c, m.textContent = `
50
- .app-container * {
51
- /* 优化字体渲染,防止缩放时字体模糊 */
52
- -webkit-font-smoothing: antialiased !important;
53
- -moz-osx-font-smoothing: grayscale !important;
54
- text-rendering: optimizeLegibility !important;
55
- }
56
- `, document.head.appendChild(m));
57
- }, g = () => {
58
- if (typeof document > "u") return;
59
- const m = document.getElementById("page-zoom-controller-styles");
60
- m && m.remove();
61
- };
62
- return O(() => {
63
- s(), p(), window.addEventListener("resize", s), n && (window.addEventListener("wheel", l, { passive: !1 }), window.addEventListener("keydown", l), window.addEventListener("touchstart", r, {
64
- passive: !1
65
- }), window.addEventListener("touchmove", r, { passive: !1 }), window.addEventListener("gesturestart", t, {
66
- passive: !1
67
- }), window.addEventListener("gesturechange", t, {
68
- passive: !1
69
- }), window.addEventListener("gestureend", t, {
70
- passive: !1
71
- }), document.body.style.touchAction = "none");
72
- }), D(() => {
73
- window.removeEventListener("resize", s), g(), n && (window.removeEventListener("wheel", l), window.removeEventListener("keydown", l), window.removeEventListener("touchstart", r), window.removeEventListener("touchmove", r), window.removeEventListener("gesturestart", t), window.removeEventListener("gesturechange", t), window.removeEventListener("gestureend", t), document.body.style.touchAction === "none" && (document.body.style.touchAction = ""));
74
- }), {
75
- containerStyles: i,
76
- containerClasses: d,
77
- scaleValue: a
78
- };
79
- }, _ = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), V = (e) => e.replace(/-([a-z])/g, (o, n) => n.toUpperCase()), T = (e) => typeof e != "object" || e === null ? e : Array.isArray(e) ? e.map(T) : Object.keys(e).reduce((o, n) => {
80
- const a = _(n);
81
- return n === "dataValue" && (e.dataType === "object" || e.dataType === "arrayObject") ? o[a] = e[n] : o[a] = T(e[n]), o;
82
- }, {}), k = (e) => typeof e != "object" || e === null ? e : Array.isArray(e) ? e.map(k) : Object.keys(e).reduce((o, n) => {
83
- const a = V(n);
84
- return o[a] = k(e[n]), o;
85
- }, {}), ie = ({ logout: e, axiosConfig: o = {}, t: n } = {}) => {
86
- const { language: a } = o, s = n || o?.t, l = (t, i, d) => {
87
- if (typeof s == "function") {
88
- const p = s(t, d);
89
- return p === t ? i : p;
90
- }
91
- return i;
92
- }, r = U.create({
93
- baseURL: "",
94
- headers: {
95
- "Content-Type": "application/json;",
96
- "Accept-Language": a
97
- },
98
- withCredentials: !1,
99
- paramsSerializer: (t) => j.stringify(t, { indices: !1 }),
100
- ...o
101
- });
102
- return r.interceptors.request.use(
103
- (t) => (t.dataType === "formData" && (t.headers["Content-Type"] = "multipart/form-data"), t.dataType === "yaml" && (t.headers["Content-Type"] = "application/yaml", t.headers.Accept = "yaml", t.data = $.dump(t.data)), t.cozeToken && (t.headers.Authorization = `Bearer ${t.cozeToken}`), t.skipCamelToKebab || (t.data = T(t.data), t.params = T(t.params)), t),
104
- (t) => {
105
- Promise.reject(t);
106
- }
107
- ), r.interceptors.response.use(
108
- (t) => {
109
- if (t.request.responseType !== "arraybuffer" && (t.config.headers.Accept === "json" || t.config.headers.Accept === "application/json, text/plain, */*")) {
110
- const i = t.config.skipKebabToCamel ? t.data : k(t.data);
111
- if ([21401, 20401, 21409].includes(i.code)) {
112
- e?.();
113
- return;
114
- } else
115
- i.code && i.mesg && y.error(i.mesg);
116
- return i;
117
- }
118
- return t;
119
- },
120
- (t) => (t.response && t.response.status ? y.error(t.response.data.mesg) : navigator.onLine || y.error(l("REQUEST.NETWORK_ERROR", "网络异常请检查")), t.code === "ECONNABORTED" && t.message.includes("timeout") && y({
121
- message: l("REQUEST.TIMEOUT", "网络请求超时"),
122
- type: "error",
123
- duration: 3 * 1e3
124
- }), Promise.reject(t))
125
- ), r;
126
- }, F = (e, o) => e && [21401, 20401, 21409].includes(e.code) ? (o?.(), !0) : !1, ce = ({ logout: e } = {}) => (o, {
127
- method: n = "post",
128
- signal: a,
129
- body: s,
130
- successCallback: l,
131
- errCallback: r,
132
- openCallback: t
133
- }) => {
134
- const i = {
135
- method: n,
136
- signal: a,
137
- headers: {
138
- "Content-Type": "application/json"
139
- },
140
- async onopen(d) {
141
- const p = d.headers.get("content-type");
142
- if (d.status === 200 && (!p || !p.includes("text/event-stream"))) {
143
- const g = await d.json();
144
- F(g, e);
145
- }
146
- t?.(d);
147
- },
148
- onmessage(d) {
149
- l?.(d);
150
- },
151
- onerror(d) {
152
- throw r?.(d), new Error("请求出错");
153
- },
154
- openWhenHidden: !0
155
- };
156
- if (n == "post") {
157
- const d = T(s);
158
- i.body = JSON.stringify(d);
159
- }
160
- H(o, i);
1
+ import { computed as e, markRaw as t, onMounted as n, onUnmounted as r, ref as i } from "vue";
2
+ import a from "axios";
3
+ import o from "qs";
4
+ import s from "js-yaml";
5
+ import { ElMessage as c, ElMessageBox as l } from "element-plus";
6
+ import { fetchEventSource as u } from "@microsoft/fetch-event-source";
7
+ import { IconBasicError as d, IconBasicSuccess as f, IconBasicWarn as p, IconClose as m } from "color-message-lingyun-vue";
8
+ //#region methods/pageZoomController.js
9
+ var h = 1, g = (e = .9) => {
10
+ let t = 1920, n = window.innerWidth, r = window.innerHeight, i = n === t, a = i ? h : n / t, o = i ? h : r / 1080, s = Math.min(a, o);
11
+ return Math.max(e, s);
12
+ }, _ = (t = {}) => {
13
+ let { minScale: a = .9, enableZoomPrevention: o = !1 } = t, s = i(h), c = () => {
14
+ s.value = g(a), document.documentElement.style.setProperty("--app-scale", s.value.toString());
15
+ }, l = (e) => {
16
+ if ((e.ctrlKey || e.metaKey) && (e.key === "+" || e.key === "-" || e.key === "=" || e.key === "0")) {
17
+ e.preventDefault();
18
+ return;
19
+ }
20
+ if (e.ctrlKey && e.type === "wheel") {
21
+ e.preventDefault();
22
+ return;
23
+ }
24
+ }, u = (e) => {
25
+ e.touches && e.touches.length > 1 && e.preventDefault();
26
+ }, d = (e) => {
27
+ e.preventDefault();
28
+ }, f = e(() => {
29
+ let e = s.value !== h;
30
+ return {
31
+ transform: `scale(${s.value})`,
32
+ transformOrigin: "top left",
33
+ position: e ? "fixed" : "relative",
34
+ width: `calc(100% / ${s.value})`,
35
+ height: `calc(100% / ${s.value})`,
36
+ ...e && {
37
+ top: "0",
38
+ left: "0"
39
+ }
40
+ };
41
+ }), p = e(() => {
42
+ let e = s.value !== h;
43
+ return { "app-container": e };
44
+ }), m = () => {
45
+ if (typeof document > "u") return;
46
+ let e = "page-zoom-controller-styles", t = document.getElementById(e);
47
+ t || (t = document.createElement("style"), t.id = e, t.textContent = "\n .app-container * {\n /* 优化字体渲染,防止缩放时字体模糊 */\n -webkit-font-smoothing: antialiased !important;\n -moz-osx-font-smoothing: grayscale !important;\n text-rendering: optimizeLegibility !important;\n }\n ", document.head.appendChild(t));
48
+ }, _ = () => {
49
+ if (typeof document > "u") return;
50
+ let e = document.getElementById("page-zoom-controller-styles");
51
+ e && e.remove();
52
+ };
53
+ return n(() => {
54
+ c(), m(), window.addEventListener("resize", c), o && (window.addEventListener("wheel", l, { passive: !1 }), window.addEventListener("keydown", l), window.addEventListener("touchstart", u, { passive: !1 }), window.addEventListener("touchmove", u, { passive: !1 }), window.addEventListener("gesturestart", d, { passive: !1 }), window.addEventListener("gesturechange", d, { passive: !1 }), window.addEventListener("gestureend", d, { passive: !1 }), document.body.style.touchAction = "none");
55
+ }), r(() => {
56
+ window.removeEventListener("resize", c), _(), o && (window.removeEventListener("wheel", l), window.removeEventListener("keydown", l), window.removeEventListener("touchstart", u), window.removeEventListener("touchmove", u), window.removeEventListener("gesturestart", d), window.removeEventListener("gesturechange", d), window.removeEventListener("gestureend", d), document.body.style.touchAction === "none" && (document.body.style.touchAction = ""));
57
+ }), {
58
+ containerStyles: f,
59
+ containerClasses: p,
60
+ scaleValue: s
61
+ };
62
+ }, v = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), y = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), b = (e) => typeof e != "object" || !e ? e : Array.isArray(e) ? e.map(b) : Object.keys(e).reduce((t, n) => {
63
+ let r = v(n);
64
+ return n === "dataValue" && (e.dataType === "object" || e.dataType === "arrayObject") ? t[r] = e[n] : t[r] = b(e[n]), t;
65
+ }, {}), x = (e) => typeof e != "object" || !e ? e : Array.isArray(e) ? e.map(x) : Object.keys(e).reduce((t, n) => {
66
+ let r = y(n);
67
+ return t[r] = x(e[n]), t;
68
+ }, {}), S = ({ logout: e, axiosConfig: t = {}, t: n } = {}) => {
69
+ let { language: r } = t, i = n || t?.t, l = (e, t, n) => {
70
+ if (typeof i == "function") {
71
+ let r = i(e, n);
72
+ return r === e ? t : r;
73
+ }
74
+ return t;
75
+ }, u = a.create({
76
+ baseURL: "",
77
+ headers: {
78
+ "Content-Type": "application/json;",
79
+ "Accept-Language": r
80
+ },
81
+ withCredentials: !1,
82
+ paramsSerializer: (e) => o.stringify(e, { indices: !1 }),
83
+ ...t
84
+ });
85
+ return u.interceptors.request.use((e) => (e.dataType === "formData" && (e.headers["Content-Type"] = "multipart/form-data"), e.dataType === "yaml" && (e.headers["Content-Type"] = "application/yaml", e.headers.Accept = "yaml", e.data = s.dump(e.data)), e.cozeToken && (e.headers.Authorization = `Bearer ${e.cozeToken}`), e.skipCamelToKebab || (e.data = b(e.data), e.params = b(e.params)), e), (e) => {
86
+ Promise.reject(e);
87
+ }), u.interceptors.response.use((t) => {
88
+ if (t.request.responseType !== "arraybuffer" && (t.config.headers.Accept === "json" || t.config.headers.Accept === "application/json, text/plain, */*")) {
89
+ let n = t.config.skipKebabToCamel ? t.data : x(t.data);
90
+ if ([
91
+ 21401,
92
+ 20401,
93
+ 21409
94
+ ].includes(n.code)) {
95
+ e?.();
96
+ return;
97
+ } else n.code && n.mesg && c.error(n.mesg);
98
+ return n;
99
+ }
100
+ return t;
101
+ }, (e) => (e?.response && e?.response?.status ? e?.response?.data?.mesg && c.error(e.response.data.mesg) : navigator.onLine || c.error(l("REQUEST.NETWORK_ERROR", "网络异常请检查")), e?.code === "ECONNABORTED" && e?.message?.includes("timeout") && c({
102
+ message: l("REQUEST.TIMEOUT", "网络请求超时"),
103
+ type: "error",
104
+ duration: 3 * 1e3
105
+ }), Promise.reject(e))), u;
106
+ }, C = (e, t) => e && [
107
+ 21401,
108
+ 20401,
109
+ 21409
110
+ ].includes(e.code) ? (t?.(), !0) : !1, ee = ({ logout: e } = {}) => (t, { method: n = "post", signal: r, body: i, successCallback: a, errCallback: o, openCallback: s }) => {
111
+ let c = {
112
+ method: n,
113
+ signal: r,
114
+ headers: { "Content-Type": "application/json" },
115
+ async onopen(t) {
116
+ let n = t.headers.get("content-type");
117
+ t.status === 200 && (!n || !n.includes("text/event-stream")) && C(await t.json(), e), s?.(t);
118
+ },
119
+ onmessage(e) {
120
+ a?.(e);
121
+ },
122
+ onerror(e) {
123
+ throw o?.(e), Error("请求出错");
124
+ },
125
+ openWhenHidden: !0
126
+ };
127
+ if (n == "post") {
128
+ let e = b(i);
129
+ c.body = JSON.stringify(e);
130
+ }
131
+ u(t, c);
161
132
  }, w = {
162
- success: "success",
163
- error: "error",
164
- warning: "warning"
165
- }, J = {
166
- [w.success]: S(W),
167
- [w.error]: S(K),
168
- [w.warning]: S(z)
169
- }, I = (e, o) => {
170
- y({
171
- grouping: !0,
172
- duration: 5e3,
173
- type: o,
174
- message: e,
175
- offset: 66,
176
- icon: J[o]
177
- });
178
- }, le = (e) => {
179
- I(e, w.success);
180
- }, de = (e) => {
181
- I(e, w.error);
182
- }, ue = (e) => {
183
- I(e, w.warning);
184
- }, pe = (e = {}) => {
185
- const o = [];
186
- e?.text && o.push(
187
- `<div class="text-202434 fz-14 weight-500">${e?.text}</div>`
188
- ), e?.subText && o.push(
189
- `<div class="text-74798c fz-12">${e?.subText}</div>`
190
- );
191
- const n = {
192
- prompt: "提示",
193
- confirmButtonText: "删除",
194
- cancelButtonText: "取消",
195
- type: "warning",
196
- icon: S(z),
197
- closeIcon: S(N),
198
- confirmButtonClass: "el-button--danger"
199
- };
200
- return M.confirm(
201
- o.join(""),
202
- e?.prompt || n.prompt,
203
- {
204
- confirmButtonText: e?.confirmButtonText || n.confirmButtonText,
205
- cancelButtonText: e?.cancelButtonText || n.cancelButtonText,
206
- type: e?.type || n.type,
207
- icon: e?.icon || n.icon,
208
- closeIcon: e?.closeIcon || n.closeIcon,
209
- dangerouslyUseHTMLString: !0,
210
- confirmButtonClass: e?.confirmButtonClass || n.confirmButtonClass
211
- }
212
- ).then(() => {
213
- e?.success?.();
214
- }).catch(() => {
215
- e?.error?.();
216
- });
217
- }, me = {
218
- sendMessage: "sendMessage",
219
- stopChat: "stopChat",
220
- generationStart: "generationStart",
221
- generationComplete: "generationComplete",
222
- delete: "delete",
223
- change: "change",
224
- updateModelValue: "update:modelValue",
225
- paginationChange: "pagination-change",
226
- operation: "operation",
227
- menuSelect: "menuSelect",
228
- updateData: "update-data",
229
- cancel: "cancel",
230
- confirm: "confirm",
231
- open: "open",
232
- opened: "opened",
233
- close: "close",
234
- closed: "closed",
235
- openAutoFocus: "open-auto-focus",
236
- closeAutoFocus: "close-auto-focus",
237
- updatePageSize: "update-page-size",
238
- updateCurrentPage: "update-current-page",
239
- currentChange: "current-change",
240
- enter: "enter",
241
- visibleChange: "visible-change",
242
- click: "click",
243
- command: "command",
244
- tabChange: "tab-change",
245
- uploadSuccess: "upload-success",
246
- search: "search",
247
- reset: "reset",
248
- actionClick: "action-click",
249
- sizeChange: "size-change",
250
- dataLoaded: "data-loaded",
251
- dataError: "data-error",
252
- save: "save",
253
- updateType: "update:type",
254
- updateVisible: "update:visible",
255
- updateAllVisible: "update:allVisible",
256
- edit: "edit",
257
- blur: "blur",
258
- focus: "focus"
259
- }, ge = {
260
- success: "0000",
261
- // 成功
262
- notLogin: 401,
263
- // 未登录
264
- canceled: "ERR_CANCELED"
265
- }, Z = {
266
- pageNum: 1,
267
- pageSize: 20
268
- }, fe = {
269
- text: "text",
270
- select: "select",
271
- date: "date",
272
- inputNumber: "inputNumber",
273
- switch: "switch",
274
- radio: "radio",
275
- checkbox: "checkbox",
276
- textarea: "textarea",
277
- upload: "upload"
278
- }, he = {
279
- date: "YYYY-MM-DD",
280
- dateTime: "YYYY-MM-DD HH:mm:ss"
281
- }, ve = {
282
- search: "search",
283
- reset: "reset",
284
- export: "export",
285
- import: "import",
286
- add: "add",
287
- edit: "edit",
288
- delete: "delete",
289
- cancel: "cancel",
290
- submit: "submit"
291
- }, b = {
292
- year: "year",
293
- month: "month",
294
- date: "date",
295
- datetime: "datetime",
296
- week: "week",
297
- datetimerange: "datetimerange",
298
- daterange: "daterange",
299
- monthrange: "monthrange",
300
- dates: "dates",
301
- years: "years",
302
- months: "months",
303
- yearrange: "yearrange"
304
- }, we = {
305
- [b.datetimerange]: {
306
- rangeSeparator: "至",
307
- startPlaceholder: "开始时间",
308
- endPlaceholder: "结束时间"
309
- },
310
- [b.daterange]: {
311
- rangeSeparator: "至",
312
- startPlaceholder: "开始日期",
313
- endPlaceholder: "结束日期"
314
- },
315
- [b.monthrange]: {
316
- rangeSeparator: "",
317
- startPlaceholder: "开始月份",
318
- endPlaceholder: "结束月份"
319
- },
320
- [b.yearrange]: {
321
- rangeSeparator: "至",
322
- startPlaceholder: "开始年份",
323
- endPlaceholder: "结束年份"
324
- }
325
- }, ye = {
326
- label: "name",
327
- value: "id"
328
- }, Se = {
329
- satoken: "satoken"
330
- }, xe = {
331
- pageSizes: [Z.pageSize, 50, 100, 200],
332
- layout: "total, sizes, prev, pager, next, jumper"
333
- }, u = {
334
- png: "png",
335
- jpeg: "jpeg",
336
- jpg: "jpg",
337
- gif: "gif",
338
- bmp: "bmp",
339
- webp: "webp",
340
- pdf: "pdf",
341
- doc: "doc",
342
- docx: "docx",
343
- xls: "xls",
344
- xlsx: "xlsx",
345
- ppt: "ppt",
346
- pptx: "pptx",
347
- txt: "txt",
348
- md: "md",
349
- csv: "csv",
350
- json: "json"
351
- }, B = "image/jpeg", Te = {
352
- [u.png]: "image/png",
353
- [u.jpeg]: B,
354
- [u.jpg]: B,
355
- [u.gif]: "image/gif",
356
- [u.bmp]: "image/bmp",
357
- [u.webp]: "image/webp",
358
- [u.pdf]: "application/pdf",
359
- [u.doc]: "application/msword",
360
- [u.docx]: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
361
- [u.xls]: "application/vnd.ms-excel",
362
- [u.xlsx]: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
363
- [u.ppt]: "application/vnd.ms-powerpoint",
364
- [u.pptx]: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
365
- [u.txt]: "text/plain",
366
- [u.md]: "text/markdown",
367
- [u.csv]: "text/csv",
368
- [u.json]: "application/json"
369
- }, be = {
370
- blob: "blob"
371
- }, Ee = {
372
- max: 3
373
- }, Ce = {
374
- keepAliveExclude: "keep-alive-exclude",
375
- keepAliveInclude: "keep-alive-include"
376
- }, ke = {
377
- complete: "complete"
378
- }, Ae = {
379
- eventStream: "text/event-stream"
380
- }, Le = {
381
- horizontal: "horizontal",
382
- vertical: "vertical"
383
- }, Ie = {
384
- left: "left",
385
- right: "right",
386
- top: "top"
387
- }, h = {
388
- serviceUp: "serviceUp",
389
- marketing: "marketing",
390
- demandPre: "demandPre",
391
- summary: "summary",
392
- verify: "verify",
393
- efficiency: "efficiency",
394
- aiAudit: "aiAudit"
395
- }, Pe = [
396
- { label: "服务提升", value: h.serviceUp },
397
- { label: "营销转化", value: h.marketing },
398
- { label: "诉求预判", value: h.demandPre },
399
- { label: "AI稽核", value: h.aiAudit },
400
- { label: "归纳总结", value: h.summary },
401
- { label: "信息查证", value: h.verify },
402
- { label: "效能提升", value: h.efficiency }
403
- ], f = {
404
- textCreation: "1",
405
- efficiencyTool: "2",
406
- mediaEntertainment: "3",
407
- officePersonnel: "4",
408
- webSearch: "5",
409
- newsReading: "6",
410
- marketingEcommerce: "7",
411
- other: "8"
412
- }, Be = [
413
- {
414
- label: "文本创作",
415
- value: f.textCreation
416
- },
417
- {
418
- label: "效率工具",
419
- value: f.efficiencyTool
420
- },
421
- {
422
- label: "媒体文娱",
423
- value: f.mediaEntertainment
424
- },
425
- {
426
- label: "办公人事",
427
- value: f.officePersonnel
428
- },
429
- {
430
- label: "网页搜索",
431
- value: f.webSearch
432
- },
433
- {
434
- label: "新闻阅读",
435
- value: f.newsReading
436
- },
437
- {
438
- label: "营销电商",
439
- value: f.marketingEcommerce
440
- },
441
- {
442
- label: "其他",
443
- value: f.other
444
- }
445
- ], Me = () => window.$wujie, A = {
446
- ACCOUNT: "aibox_account",
447
- logoutTag: "logout"
133
+ success: "success",
134
+ error: "error",
135
+ warning: "warning"
136
+ }, T = {
137
+ [w.success]: t(f),
138
+ [w.error]: t(d),
139
+ [w.warning]: t(p)
140
+ }, E = (e, t) => {
141
+ c({
142
+ grouping: !0,
143
+ duration: 5e3,
144
+ type: t,
145
+ message: e,
146
+ offset: 66,
147
+ icon: T[t]
148
+ });
149
+ }, D = (e) => {
150
+ E(e, w.success);
151
+ }, te = (e) => {
152
+ E(e, w.error);
153
+ }, ne = (e) => {
154
+ E(e, w.warning);
155
+ }, re = (e = {}) => {
156
+ let n = [];
157
+ e?.text && n.push(`<div class="text-202434 fz-14 weight-500">${e?.text}</div>`), e?.subText && n.push(`<div class="text-74798c fz-12">${e?.subText}</div>`);
158
+ let r = {
159
+ prompt: "提示",
160
+ confirmButtonText: "删除",
161
+ cancelButtonText: "取消",
162
+ type: "warning",
163
+ icon: t(p),
164
+ closeIcon: t(m),
165
+ confirmButtonClass: "el-button--danger"
166
+ };
167
+ return l.confirm(n.join(""), e?.prompt || r.prompt, {
168
+ confirmButtonText: e?.confirmButtonText || r.confirmButtonText,
169
+ cancelButtonText: e?.cancelButtonText || r.cancelButtonText,
170
+ type: e?.type || r.type,
171
+ icon: e?.icon || r.icon,
172
+ closeIcon: e?.closeIcon || r.closeIcon,
173
+ dangerouslyUseHTMLString: !0,
174
+ confirmButtonClass: e?.confirmButtonClass || r.confirmButtonClass
175
+ }).then(() => {
176
+ e?.success?.();
177
+ }).catch(() => {
178
+ e?.error?.();
179
+ });
180
+ }, ie = {
181
+ sendMessage: "sendMessage",
182
+ stopChat: "stopChat",
183
+ generationStart: "generationStart",
184
+ generationComplete: "generationComplete",
185
+ delete: "delete",
186
+ change: "change",
187
+ updateModelValue: "update:modelValue",
188
+ paginationChange: "pagination-change",
189
+ operation: "operation",
190
+ menuSelect: "menuSelect",
191
+ updateData: "update-data",
192
+ cancel: "cancel",
193
+ confirm: "confirm",
194
+ open: "open",
195
+ opened: "opened",
196
+ close: "close",
197
+ closed: "closed",
198
+ openAutoFocus: "open-auto-focus",
199
+ closeAutoFocus: "close-auto-focus",
200
+ updatePageSize: "update-page-size",
201
+ updateCurrentPage: "update-current-page",
202
+ currentChange: "current-change",
203
+ enter: "enter",
204
+ visibleChange: "visible-change",
205
+ click: "click",
206
+ command: "command",
207
+ tabChange: "tab-change",
208
+ uploadSuccess: "upload-success",
209
+ search: "search",
210
+ reset: "reset",
211
+ actionClick: "action-click",
212
+ sizeChange: "size-change",
213
+ dataLoaded: "data-loaded",
214
+ dataError: "data-error",
215
+ save: "save",
216
+ updateType: "update:type",
217
+ updateVisible: "update:visible",
218
+ updateAllVisible: "update:allVisible",
219
+ edit: "edit",
220
+ blur: "blur",
221
+ focus: "focus"
222
+ }, ae = {
223
+ success: "0000",
224
+ notLogin: 401,
225
+ canceled: "ERR_CANCELED"
226
+ }, O = {
227
+ pageNum: 1,
228
+ pageSize: 20
229
+ }, oe = {
230
+ text: "text",
231
+ select: "select",
232
+ date: "date",
233
+ inputNumber: "inputNumber",
234
+ switch: "switch",
235
+ radio: "radio",
236
+ checkbox: "checkbox",
237
+ textarea: "textarea",
238
+ upload: "upload"
239
+ }, se = {
240
+ date: "YYYY-MM-DD",
241
+ dateTime: "YYYY-MM-DD HH:mm:ss"
242
+ }, ce = {
243
+ search: "search",
244
+ reset: "reset",
245
+ export: "export",
246
+ import: "import",
247
+ add: "add",
248
+ edit: "edit",
249
+ delete: "delete",
250
+ cancel: "cancel",
251
+ submit: "submit"
252
+ }, k = {
253
+ year: "year",
254
+ month: "month",
255
+ date: "date",
256
+ datetime: "datetime",
257
+ week: "week",
258
+ datetimerange: "datetimerange",
259
+ daterange: "daterange",
260
+ monthrange: "monthrange",
261
+ dates: "dates",
262
+ years: "years",
263
+ months: "months",
264
+ yearrange: "yearrange"
265
+ }, A = {
266
+ [k.datetimerange]: {
267
+ rangeSeparator: "",
268
+ startPlaceholder: "开始时间",
269
+ endPlaceholder: "结束时间"
270
+ },
271
+ [k.daterange]: {
272
+ rangeSeparator: "",
273
+ startPlaceholder: "开始日期",
274
+ endPlaceholder: "结束日期"
275
+ },
276
+ [k.monthrange]: {
277
+ rangeSeparator: "至",
278
+ startPlaceholder: "开始月份",
279
+ endPlaceholder: "结束月份"
280
+ },
281
+ [k.yearrange]: {
282
+ rangeSeparator: "至",
283
+ startPlaceholder: "开始年份",
284
+ endPlaceholder: "结束年份"
285
+ }
286
+ }, j = {
287
+ label: "name",
288
+ value: "id"
289
+ }, M = { satoken: "satoken" }, N = {
290
+ pageSizes: [
291
+ O.pageSize,
292
+ 50,
293
+ 100,
294
+ 200
295
+ ],
296
+ layout: "total, sizes, prev, pager, next, jumper"
297
+ }, P = {
298
+ png: "png",
299
+ jpeg: "jpeg",
300
+ jpg: "jpg",
301
+ gif: "gif",
302
+ bmp: "bmp",
303
+ webp: "webp",
304
+ pdf: "pdf",
305
+ doc: "doc",
306
+ docx: "docx",
307
+ xls: "xls",
308
+ xlsx: "xlsx",
309
+ ppt: "ppt",
310
+ pptx: "pptx",
311
+ txt: "txt",
312
+ md: "md",
313
+ csv: "csv",
314
+ json: "json"
315
+ }, F = "image/jpeg", I = {
316
+ [P.png]: "image/png",
317
+ [P.jpeg]: F,
318
+ [P.jpg]: F,
319
+ [P.gif]: "image/gif",
320
+ [P.bmp]: "image/bmp",
321
+ [P.webp]: "image/webp",
322
+ [P.pdf]: "application/pdf",
323
+ [P.doc]: "application/msword",
324
+ [P.docx]: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
325
+ [P.xls]: "application/vnd.ms-excel",
326
+ [P.xlsx]: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
327
+ [P.ppt]: "application/vnd.ms-powerpoint",
328
+ [P.pptx]: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
329
+ [P.txt]: "text/plain",
330
+ [P.md]: "text/markdown",
331
+ [P.csv]: "text/csv",
332
+ [P.json]: "application/json"
333
+ }, L = { blob: "blob" }, R = { max: 3 }, z = {
334
+ keepAliveExclude: "keep-alive-exclude",
335
+ keepAliveInclude: "keep-alive-include"
336
+ }, B = { complete: "complete" }, V = { eventStream: "text/event-stream" }, H = {
337
+ horizontal: "horizontal",
338
+ vertical: "vertical"
339
+ }, U = {
340
+ left: "left",
341
+ right: "right",
342
+ top: "top"
343
+ }, W = {
344
+ serviceUp: "serviceUp",
345
+ marketing: "marketing",
346
+ demandPre: "demandPre",
347
+ summary: "summary",
348
+ verify: "verify",
349
+ efficiency: "efficiency",
350
+ aiAudit: "aiAudit"
351
+ }, le = [
352
+ {
353
+ label: "服务提升",
354
+ value: W.serviceUp
355
+ },
356
+ {
357
+ label: "营销转化",
358
+ value: W.marketing
359
+ },
360
+ {
361
+ label: "诉求预判",
362
+ value: W.demandPre
363
+ },
364
+ {
365
+ label: "AI稽核",
366
+ value: W.aiAudit
367
+ },
368
+ {
369
+ label: "归纳总结",
370
+ value: W.summary
371
+ },
372
+ {
373
+ label: "信息查证",
374
+ value: W.verify
375
+ },
376
+ {
377
+ label: "效能提升",
378
+ value: W.efficiency
379
+ }
380
+ ], G = {
381
+ textCreation: "1",
382
+ efficiencyTool: "2",
383
+ mediaEntertainment: "3",
384
+ officePersonnel: "4",
385
+ webSearch: "5",
386
+ newsReading: "6",
387
+ marketingEcommerce: "7",
388
+ other: "8"
389
+ }, ue = [
390
+ {
391
+ label: "文本创作",
392
+ value: G.textCreation
393
+ },
394
+ {
395
+ label: "效率工具",
396
+ value: G.efficiencyTool
397
+ },
398
+ {
399
+ label: "媒体文娱",
400
+ value: G.mediaEntertainment
401
+ },
402
+ {
403
+ label: "办公人事",
404
+ value: G.officePersonnel
405
+ },
406
+ {
407
+ label: "网页搜索",
408
+ value: G.webSearch
409
+ },
410
+ {
411
+ label: "新闻阅读",
412
+ value: G.newsReading
413
+ },
414
+ {
415
+ label: "营销电商",
416
+ value: G.marketingEcommerce
417
+ },
418
+ {
419
+ label: "其他",
420
+ value: G.other
421
+ }
422
+ ], de = () => window.$wujie, K = {
423
+ ACCOUNT: "aibox_account",
424
+ logoutTag: "logout"
448
425
  };
449
- function E(e) {
450
- for (var o = 1; o < arguments.length; o++) {
451
- var n = arguments[o];
452
- for (var a in n)
453
- e[a] = n[a];
454
- }
455
- return e;
426
+ //#endregion
427
+ //#region ../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.mjs
428
+ function q(e) {
429
+ for (var t = 1; t < arguments.length; t++) {
430
+ var n = arguments[t];
431
+ for (var r in n) e[r] = n[r];
432
+ }
433
+ return e;
456
434
  }
457
- var q = {
458
- read: function(e) {
459
- return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
460
- },
461
- write: function(e) {
462
- return encodeURIComponent(e).replace(
463
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
464
- decodeURIComponent
465
- );
466
- }
435
+ var J = {
436
+ read: function(e) {
437
+ return e[0] === "\"" && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
438
+ },
439
+ write: function(e) {
440
+ return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
441
+ }
467
442
  };
468
- function L(e, o) {
469
- function n(s, l, r) {
470
- if (!(typeof document > "u")) {
471
- r = E({}, o, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
472
- var t = "";
473
- for (var i in r)
474
- r[i] && (t += "; " + i, r[i] !== !0 && (t += "=" + r[i].split(";")[0]));
475
- return document.cookie = s + "=" + e.write(l, s) + t;
476
- }
477
- }
478
- function a(s) {
479
- if (!(typeof document > "u" || arguments.length && !s)) {
480
- for (var l = document.cookie ? document.cookie.split("; ") : [], r = {}, t = 0; t < l.length; t++) {
481
- var i = l[t].split("="), d = i.slice(1).join("=");
482
- try {
483
- var p = decodeURIComponent(i[0]);
484
- if (r[p] = e.read(d, p), s === p)
485
- break;
486
- } catch {
487
- }
488
- }
489
- return s ? r[s] : r;
490
- }
491
- }
492
- return Object.create(
493
- {
494
- set: n,
495
- get: a,
496
- remove: function(s, l) {
497
- n(
498
- s,
499
- "",
500
- E({}, l, {
501
- expires: -1
502
- })
503
- );
504
- },
505
- withAttributes: function(s) {
506
- return L(this.converter, E({}, this.attributes, s));
507
- },
508
- withConverter: function(s) {
509
- return L(E({}, this.converter, s), this.attributes);
510
- }
511
- },
512
- {
513
- attributes: { value: Object.freeze(o) },
514
- converter: { value: Object.freeze(e) }
515
- }
516
- );
443
+ function Y(e, t) {
444
+ function n(n, r, i) {
445
+ if (!(typeof document > "u")) {
446
+ i = q({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires &&= i.expires.toUTCString(), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
447
+ var a = "";
448
+ for (var o in i) i[o] && (a += "; " + o, i[o] !== !0 && (a += "=" + i[o].split(";")[0]));
449
+ return document.cookie = n + "=" + e.write(r, n) + a;
450
+ }
451
+ }
452
+ function r(t) {
453
+ if (!(typeof document > "u" || arguments.length && !t)) {
454
+ for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, i = 0; i < n.length; i++) {
455
+ var a = n[i].split("="), o = a.slice(1).join("=");
456
+ try {
457
+ var s = decodeURIComponent(a[0]);
458
+ if (r[s] = e.read(o, s), t === s) break;
459
+ } catch {}
460
+ }
461
+ return t ? r[t] : r;
462
+ }
463
+ }
464
+ return Object.create({
465
+ set: n,
466
+ get: r,
467
+ remove: function(e, t) {
468
+ n(e, "", q({}, t, { expires: -1 }));
469
+ },
470
+ withAttributes: function(e) {
471
+ return Y(this.converter, q({}, this.attributes, e));
472
+ },
473
+ withConverter: function(e) {
474
+ return Y(q({}, this.converter, e), this.attributes);
475
+ }
476
+ }, {
477
+ attributes: { value: Object.freeze(t) },
478
+ converter: { value: Object.freeze(e) }
479
+ });
517
480
  }
518
- var C = L(q, { path: "/" });
519
- const ze = (e = A.logoutTag) => {
520
- e && window.localStorage.setItem(e, (/* @__PURE__ */ new Date()).getTime());
521
- }, G = ({ tokenKey: e = "ai-token" } = {}) => ({
522
- // ========== Token 相关 ==========
523
- /**
524
- * 获取 Token
525
- * @returns {string} Token 值
526
- */
527
- getToken() {
528
- return C.get(e);
529
- },
530
- /**
531
- * 设置 Token
532
- * @param {string} value - Token 值
533
- */
534
- setToken(o) {
535
- C.set(e, o);
536
- },
537
- /**
538
- * 清除 Token
539
- */
540
- removeToken() {
541
- return C.remove(e);
542
- },
543
- // ========== SessionStorage 相关 ==========
544
- /**
545
- * 设置 SessionStorage
546
- * @param {string} key - 键名
547
- * @param {any} data - 数据
548
- */
549
- setSessionStorage(o, n) {
550
- return window.sessionStorage.setItem(o, JSON.stringify(n));
551
- },
552
- /**
553
- * 获取 SessionStorage
554
- * @param {string} key - 键名
555
- * @returns {any} 解析后的数据
556
- */
557
- getSessionStorage(o) {
558
- const n = window.sessionStorage.getItem(o);
559
- if (!n) return null;
560
- try {
561
- return JSON.parse(n);
562
- } catch {
563
- return n;
564
- }
565
- },
566
- /**
567
- * 移除指定的 SessionStorage
568
- * @param {string} key - 键名
569
- */
570
- removeSessionStorageById(o) {
571
- return window.sessionStorage.removeItem(o);
572
- },
573
- /**
574
- * 清除所有 SessionStorage
575
- */
576
- removeSessionStorage() {
577
- return window.sessionStorage.clear();
578
- },
579
- // ========== LocalStorage 相关 ==========
580
- /**
581
- * 设置 LocalStorage
582
- * @param {string} key - 键名
583
- * @param {any} data - 数据
584
- */
585
- setLocalStorage(o, n) {
586
- return window.localStorage.setItem(o, JSON.stringify(n));
587
- },
588
- /**
589
- * 获取 LocalStorage
590
- * @param {string} key - 键名
591
- * @returns {any} 解析后的数据
592
- */
593
- getLocalStorage(o) {
594
- const n = window.localStorage.getItem(o);
595
- if (!n) return null;
596
- try {
597
- return JSON.parse(n);
598
- } catch {
599
- return n;
600
- }
601
- },
602
- /**
603
- * 移除指定的 LocalStorage
604
- * @param {string} key - 键名
605
- */
606
- removeLocalStorageById(o) {
607
- return window.localStorage.removeItem(o);
608
- },
609
- /**
610
- * 清除所有 LocalStorage
611
- */
612
- removeLocalStorage() {
613
- return window.localStorage.clear();
614
- },
615
- //清除token、和sessionStorage、localStorage、除了记住密码
616
- clearAllStoreStates(o = A.logoutTag, n = A.ACCOUNT) {
617
- const a = this.getLocalStorage(n);
618
- console.log("清除所有 LocalStorage 保留记住密码", a), this.removeToken(), this.removeSessionStorage(), this.removeLocalStorage(), a && this.setLocalStorage(n, a);
619
- }
620
- }), Re = ({
621
- getUserInfo: e,
622
- baseUrl: o,
623
- tokenKey: n = "ai-token",
624
- logoutTag: a,
625
- accountKey: s
626
- } = {}) => {
627
- let l = !1;
628
- const r = G({ tokenKey: n });
629
- return (t) => {
630
- if (l || (window.location.pathname || "").includes("login")) return;
631
- l = !0, r.clearAllStoreStates(a, s);
632
- const d = e ? e() : null, p = window.location.pathname + window.location.search, g = d?.name || "";
633
- let c = "";
634
- const m = o || "/";
635
- m === "/" ? t ? c = "/login" : c = g ? `/login?fromPath=${p}&userName=${g}` : `/login?fromPath=${p}` : t ? c = `${m}/login` : c = g ? `${m}/login?fromPath=${p}&userName=${encodeURIComponent(g)}` : `${m}/login?fromPath=${p}`, window.location.href = c;
636
- };
637
- };
638
- let v = null;
639
- const Q = (e = {}) => {
640
- const {
641
- message: o = "您已退出当前账号,将为您刷新数据!",
642
- title: n = "提醒",
643
- confirmButtonText: a = "确定",
644
- onConfirm: s = () => window.location.reload(),
645
- showClose: l = !1,
646
- closeOnClickModal: r = !1,
647
- messageBoxOptions: t = {}
648
- } = e;
649
- return v || (v = M.alert(o, n, {
650
- confirmButtonText: a,
651
- showClose: l,
652
- closeOnClickModal: r,
653
- ...t
654
- }), v.then(() => {
655
- v = null, s();
656
- }).catch((i) => {
657
- if (v = null, !(i === "close" || i === "cancel"))
658
- return Promise.reject(i);
659
- }));
660
- }, Oe = (e = {}) => {
661
- const { excludePaths: o = ["/login"], logoutKey: n = "logout", notificationOptions: a = {} } = e, s = (l) => {
662
- const r = window.location.pathname;
663
- o.some((i) => r.includes(i)) || l.key === n && l.newValue !== null && Q(a);
664
- };
665
- return window.addEventListener("storage", s), () => {
666
- window.removeEventListener("storage", s);
667
- };
668
- };
669
- export {
670
- A as STORAGE_KEYS,
671
- Pe as applicationTags,
672
- h as applicationTagsMap,
673
- ze as broadcastLogout,
674
- Y as calculateScale,
675
- _ as camelToKebab,
676
- ge as codeMap,
677
- fe as componentType,
678
- Se as cookieKeyMap,
679
- ie as createConfiguredAxios,
680
- Re as createLogout,
681
- ce as createSSERequest,
682
- G as createStorageUtils,
683
- he as dateFormat,
684
- we as dateParamsMap,
685
- b as dateTypeMap,
686
- me as emitsMap,
687
- Ae as headersAccept,
688
- Me as isMicroApp,
689
- V as kebabToCamel,
690
- Ee as keepAliveMap,
691
- Ie as labelPositionMap,
692
- pe as messageConfirm,
693
- de as messageError,
694
- le as messageSuccess,
695
- ue as messageWarning,
696
- Q as notifyAccountSwitchAndReload,
697
- ve as operationConfigMap,
698
- Z as pageParams,
699
- xe as paginationConfig,
700
- Be as pluginTags,
701
- f as pluginTagsMap,
702
- Ce as postMessageMap,
703
- ye as provinceMapping,
704
- ke as readyState,
705
- T as recursiveCamelToKebab,
706
- k as recursiveKebabToCamel,
707
- be as responseType,
708
- Oe as setupCrossTabLogoutListener,
709
- Le as textDirection,
710
- u as uploadFileType,
711
- Te as uploadFileTypeMap,
712
- se as usePageZoomController
481
+ var X = Y(J, { path: "/" }), fe = (e = K.logoutTag) => {
482
+ e && window.localStorage.setItem(e, (/* @__PURE__ */ new Date()).getTime());
483
+ }, Z = ({ tokenKey: e = "ai-token" } = {}) => ({
484
+ getToken() {
485
+ return X.get(e);
486
+ },
487
+ setToken(t) {
488
+ X.set(e, t);
489
+ },
490
+ removeToken() {
491
+ return X.remove(e);
492
+ },
493
+ setSessionStorage(e, t) {
494
+ return window.sessionStorage.setItem(e, JSON.stringify(t));
495
+ },
496
+ getSessionStorage(e) {
497
+ let t = window.sessionStorage.getItem(e);
498
+ if (!t) return null;
499
+ try {
500
+ return JSON.parse(t);
501
+ } catch {
502
+ return t;
503
+ }
504
+ },
505
+ removeSessionStorageById(e) {
506
+ return window.sessionStorage.removeItem(e);
507
+ },
508
+ removeSessionStorage() {
509
+ return window.sessionStorage.clear();
510
+ },
511
+ setLocalStorage(e, t) {
512
+ return window.localStorage.setItem(e, JSON.stringify(t));
513
+ },
514
+ getLocalStorage(e) {
515
+ let t = window.localStorage.getItem(e);
516
+ if (!t) return null;
517
+ try {
518
+ return JSON.parse(t);
519
+ } catch {
520
+ return t;
521
+ }
522
+ },
523
+ removeLocalStorageById(e) {
524
+ return window.localStorage.removeItem(e);
525
+ },
526
+ removeLocalStorage() {
527
+ return window.localStorage.clear();
528
+ },
529
+ clearAllStoreStates(e = K.logoutTag, t = K.ACCOUNT) {
530
+ let n = this.getLocalStorage(t);
531
+ console.log("清除所有 LocalStorage 保留记住密码", n), this.removeToken(), this.removeSessionStorage(), this.removeLocalStorage(), n && this.setLocalStorage(t, n);
532
+ }
533
+ }), pe = ({ getUserInfo: e, baseUrl: t, tokenKey: n = "ai-token", logoutTag: r, accountKey: i } = {}) => {
534
+ let a = !1, o = Z({ tokenKey: n });
535
+ return (n) => {
536
+ if (a || (window.location.pathname || "").includes("login")) return;
537
+ a = !0, o.clearAllStoreStates(r, i);
538
+ let s = e ? e() : null, c = window.location.pathname + window.location.search, l = s?.name || "", u = "", d = t || "/";
539
+ u = d === "/" ? n ? "/login" : l ? `/login?fromPath=${c}&userName=${l}` : `/login?fromPath=${c}` : n ? `${d}/login` : l ? `${d}/login?fromPath=${c}&userName=${encodeURIComponent(l)}` : `${d}/login?fromPath=${c}`, window.location.href = u;
540
+ };
541
+ }, Q = null, $ = (e = {}) => {
542
+ let { message: t = "您已退出当前账号,将为您刷新数据!", title: n = "提醒", confirmButtonText: r = "确定", onConfirm: i = () => window.location.reload(), showClose: a = !1, closeOnClickModal: o = !1, messageBoxOptions: s = {} } = e;
543
+ return Q || (Q = l.alert(t, n, {
544
+ confirmButtonText: r,
545
+ showClose: a,
546
+ closeOnClickModal: o,
547
+ ...s
548
+ }), Q.then(() => {
549
+ Q = null, i();
550
+ }).catch((e) => {
551
+ if (Q = null, !(e === "close" || e === "cancel")) return Promise.reject(e);
552
+ }));
553
+ }, me = (e = {}) => {
554
+ let { excludePaths: t = ["/login"], logoutKey: n = "logout", notificationOptions: r = {} } = e, i = (e) => {
555
+ let i = window.location.pathname;
556
+ t.some((e) => i.includes(e)) || e.key === n && e.newValue !== null && $(r);
557
+ };
558
+ return window.addEventListener("storage", i), () => {
559
+ window.removeEventListener("storage", i);
560
+ };
713
561
  };
562
+ //#endregion
563
+ export { K as STORAGE_KEYS, le as applicationTags, W as applicationTagsMap, fe as broadcastLogout, g as calculateScale, v as camelToKebab, ae as codeMap, oe as componentType, M as cookieKeyMap, S as createConfiguredAxios, pe as createLogout, ee as createSSERequest, Z as createStorageUtils, se as dateFormat, A as dateParamsMap, k as dateTypeMap, ie as emitsMap, V as headersAccept, de as isMicroApp, y as kebabToCamel, R as keepAliveMap, U as labelPositionMap, re as messageConfirm, te as messageError, D as messageSuccess, ne as messageWarning, $ as notifyAccountSwitchAndReload, ce as operationConfigMap, O as pageParams, N as paginationConfig, ue as pluginTags, G as pluginTagsMap, z as postMessageMap, j as provinceMapping, B as readyState, b as recursiveCamelToKebab, x as recursiveKebabToCamel, L as responseType, me as setupCrossTabLogoutListener, H as textDirection, P as uploadFileType, I as uploadFileTypeMap, _ as usePageZoomController };