vue-stack-tabs 1.0.1 → 1.3.0
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/README.en.md +526 -0
- package/README.md +337 -520
- package/README.ru.md +526 -0
- package/dist/iframe-bridge.d.ts +8 -0
- package/dist/iframe-bridge.html +77 -0
- package/dist/iframe-bridge.mjs +20 -0
- package/dist/iframe-child.html +88 -0
- package/dist/nuxt/favicon.svg +10 -0
- package/dist/nuxt/iframe-bridge.html +77 -0
- package/dist/nuxt/iframe-child.html +88 -0
- package/dist/nuxt/module.d.ts +6 -0
- package/dist/nuxt/module.mjs +28 -0
- package/dist/nuxt/plugin.mjs +9 -0
- package/dist/nuxt/runtime/plugin.d.ts +2 -0
- package/dist/nuxt/runtime/plugin.mjs +9 -0
- package/dist/src/lib/StackTabs.vue.d.ts +30 -16
- package/dist/src/lib/components/ContextMenu/ContextMenuItem.vue.d.ts +7 -1
- package/dist/src/lib/components/ContextMenu/index.vue.d.ts +5 -4
- package/dist/src/lib/components/PageLoading.vue.d.ts +2 -1
- package/dist/src/lib/components/StackKeepAlive/StackCacheRenderer.vue.d.ts +25 -0
- package/dist/src/lib/components/StackKeepAlive/StackKeepAlive.vue.d.ts +12 -0
- package/dist/src/lib/components/TabHeader/TabHeaderButton.vue.d.ts +11 -12
- package/dist/src/lib/components/TabHeader/TabHeaderItem.vue.d.ts +5 -4
- package/dist/src/lib/components/TabHeader/TabHeaderScroll.vue.d.ts +8 -22
- package/dist/src/lib/components/TabHeader/index.vue.d.ts +11 -164
- package/dist/src/lib/hooks/stackTabsContext.d.ts +49 -0
- package/dist/src/lib/hooks/tabPanel/evict.d.ts +21 -23
- package/dist/src/lib/hooks/tabPanel/navigationTransaction.d.ts +35 -0
- package/dist/src/lib/hooks/tabPanel/refresh.d.ts +17 -0
- package/dist/src/lib/hooks/tabPanel/scroll.d.ts +8 -8
- package/dist/src/lib/hooks/tabPanel/session.d.ts +9 -8
- package/dist/src/lib/hooks/tabPanel/state.d.ts +20 -73
- package/dist/src/lib/hooks/useIframeManager.d.ts +35 -0
- package/dist/src/lib/hooks/useTabActions.d.ts +5 -46
- package/dist/src/lib/hooks/useTabEventBus.d.ts +22 -9
- package/dist/src/lib/hooks/useTabPanel.d.ts +17 -74
- package/dist/src/lib/hooks/useTabRouter.d.ts +5 -5
- package/dist/src/lib/i18n/index.d.ts +6 -4
- package/dist/src/lib/i18n/lang/en.d.ts +5 -0
- package/dist/src/lib/i18n/lang/zh-CN.d.ts +5 -0
- package/dist/src/lib/i18n/stackTabsLocale.d.ts +2 -0
- package/dist/src/lib/iframe-bridge.d.ts +8 -0
- package/dist/src/lib/iframe.vue.d.ts +2 -1
- package/dist/src/lib/index.d.ts +4 -5
- package/dist/src/lib/model/TabModel.d.ts +14 -33
- package/dist/src/lib/nuxt/module.d.ts +6 -0
- package/dist/src/lib/nuxt/runtime/plugin.client.d.ts +2 -0
- package/dist/src/lib/nuxt/runtime/plugin.d.ts +2 -0
- package/dist/src/lib/utils/iframeBridge.d.ts +11 -3
- package/dist/src/lib/utils/stackTabsA11y.d.ts +8 -0
- package/dist/src/lib/utils/stackTabsMessage.d.ts +7 -0
- package/dist/src/lib/utils/tabInfoEncoder.d.ts +1 -16
- package/dist/src/lib/utils/typeGuards.d.ts +2 -0
- package/dist/src/lib/utils/urlParser.d.ts +24 -3
- package/dist/src/lib/versionLogger.d.ts +1 -0
- package/dist/style.css +2 -1
- package/dist/utils/iframeBridge.d.ts +39 -0
- package/dist/vue-stack-tabs.css +2 -1
- package/dist/vue-stack-tabs.es.js +1 -2411
- package/package.json +68 -47
- package/src/lib/StackTabs.vue +216 -192
- package/src/lib/assets/style/stackTab.scss +84 -12
- package/src/lib/components/ContextMenu/ContextMenuItem.vue +23 -11
- package/src/lib/components/ContextMenu/index.vue +94 -10
- package/src/lib/components/PageLoading.vue +9 -7
- package/src/lib/components/StackKeepAlive/StackCacheRenderer.vue +70 -0
- package/src/lib/components/StackKeepAlive/StackKeepAlive.vue +57 -0
- package/src/lib/components/TabHeader/TabHeaderButton.vue +19 -8
- package/src/lib/components/TabHeader/TabHeaderItem.vue +45 -16
- package/src/lib/components/TabHeader/TabHeaderScroll.vue +47 -25
- package/src/lib/components/TabHeader/index.vue +109 -12
- package/src/lib/hooks/stackTabsContext.ts +135 -0
- package/src/lib/hooks/tabPanel/evict.ts +123 -41
- package/src/lib/hooks/tabPanel/navigationTransaction.ts +61 -0
- package/src/lib/hooks/tabPanel/refresh.ts +109 -0
- package/src/lib/hooks/tabPanel/scroll.ts +57 -36
- package/src/lib/hooks/tabPanel/session.ts +84 -22
- package/src/lib/hooks/tabPanel/state.ts +41 -44
- package/src/lib/hooks/useIframeManager.ts +253 -0
- package/src/lib/hooks/useTabActions.ts +62 -30
- package/src/lib/hooks/useTabEventBus.ts +29 -19
- package/src/lib/hooks/useTabLoading.ts +3 -2
- package/src/lib/hooks/useTabPanel.tsx +415 -213
- package/src/lib/hooks/useTabRouter.ts +172 -43
- package/src/lib/i18n/index.ts +53 -45
- package/src/lib/i18n/lang/en.ts +6 -1
- package/src/lib/i18n/lang/zh-CN.ts +6 -1
- package/src/lib/i18n/stackTabsLocale.ts +8 -0
- package/src/lib/iframe-bridge.ts +12 -0
- package/src/lib/index.ts +14 -19
- package/src/lib/model/TabModel.ts +34 -86
- package/src/lib/nuxt/module.d.ts +4 -0
- package/src/lib/nuxt/module.ts +8 -3
- package/src/lib/nuxt/runtime/plugin.client.ts +2 -3
- package/src/lib/nuxt/runtime/plugin.ts +11 -0
- package/src/lib/utils/iframeBridge.ts +29 -5
- package/src/lib/utils/scrollUtils.ts +9 -4
- package/src/lib/utils/stackTabsA11y.ts +12 -0
- package/src/lib/utils/stackTabsMessage.ts +99 -0
- package/src/lib/utils/tabInfoEncoder.ts +69 -42
- package/src/lib/utils/typeGuards.ts +3 -0
- package/src/lib/utils/urlParser.ts +144 -14
- package/src/lib/versionLogger.ts +7 -19
- package/dist/src/lib/hooks/tabPanel/evict.spec.d.ts +0 -1
- package/dist/src/lib/hooks/useTabPanel.spec.d.ts +0 -1
- package/dist/src/lib/model/TabModel.spec.d.ts +0 -1
- package/dist/src/lib/utils/iframeBridge.spec.d.ts +0 -1
- package/dist/src/lib/utils/tabInfoEncoder.spec.d.ts +0 -1
- package/dist/src/lib/utils/urlParser.spec.d.ts +0 -1
- package/dist/vue-stack-tabs.umd.js +0 -1
- package/src/lib/hooks/tabPanel/evict.spec.ts +0 -85
- package/src/lib/hooks/useTabPanel.spec.ts +0 -34
- package/src/lib/model/TabModel.spec.ts +0 -40
- package/src/lib/utils/iframeBridge.spec.ts +0 -37
- package/src/lib/utils/tabInfoEncoder.spec.ts +0 -42
- package/src/lib/utils/urlParser.spec.ts +0 -45
|
@@ -1,10 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* URL 解析与安全校验工具。
|
|
3
|
+
*
|
|
4
|
+
* 提供标签 URL 的安全检查(防止 javascript: 等危险 scheme)、
|
|
5
|
+
* 跨域判断、query 参数克隆与比较、保留参数过滤等功能。
|
|
6
|
+
*/
|
|
7
|
+
import type { LocationQueryRaw } from 'vue-router'
|
|
8
|
+
|
|
9
|
+
const ALLOWED_ABOUT_URLS = new Set(['about:blank'])
|
|
10
|
+
const STACK_TABS_RESERVED_QUERY_KEYS = new Set(['__tab', '__src'])
|
|
11
|
+
|
|
12
|
+
const hasUnsafeUrlCharacter = (value: string): boolean => {
|
|
13
|
+
for (const char of value) {
|
|
14
|
+
const code = char.charCodeAt(0)
|
|
15
|
+
const isControl = code <= 31 || code === 127 || (code >= 128 && code <= 159)
|
|
16
|
+
const isZeroWidth =
|
|
17
|
+
code === 0x200b || code === 0x200c || code === 0x200d || code === 0x2060 || code === 0xfeff
|
|
18
|
+
const isBidiControl = (code >= 0x202a && code <= 0x202e) || (code >= 0x2066 && code <= 0x2069)
|
|
19
|
+
if (isControl || isZeroWidth || isBidiControl) return true
|
|
20
|
+
}
|
|
21
|
+
return false
|
|
22
|
+
}
|
|
23
|
+
const getUrlBase = (): string => {
|
|
24
|
+
if (typeof window !== 'undefined') return window.location.origin
|
|
25
|
+
return 'http://localhost'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 判断标签 URL 是否允许进入 iframe/window.open/router 等 URL sink。
|
|
30
|
+
* 允许相对路径、http(s) URL 与 about:blank;拒绝其它 scheme。
|
|
31
|
+
*/
|
|
32
|
+
export function isAllowedTabUrl(url: string): boolean {
|
|
33
|
+
const value = url.trim()
|
|
34
|
+
if (!value) return true
|
|
35
|
+
if (hasUnsafeUrlCharacter(value)) return false
|
|
36
|
+
if (ALLOWED_ABOUT_URLS.has(value.toLowerCase())) return true
|
|
37
|
+
if (value.toLowerCase().startsWith('about:')) return false
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
const parsed = new URL(value, getUrlBase())
|
|
41
|
+
return parsed.protocol === 'http:' || parsed.protocol === 'https:'
|
|
42
|
+
} catch {
|
|
43
|
+
return false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 判断是否为不允许嵌入 iframe 的 URL
|
|
3
49
|
* @param url - 待检查的 URL 字符串
|
|
4
|
-
* @returns
|
|
50
|
+
* @returns 非 allowlist URL 返回 true
|
|
5
51
|
*/
|
|
6
52
|
export function isInvalidIframeUrl(url: string): boolean {
|
|
7
|
-
return
|
|
53
|
+
return !isAllowedTabUrl(url)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** 非法 URL 降级为 about:blank,避免进入 iframe/window.open 等 URL sink */
|
|
57
|
+
export function toSafeTabUrl(url: string): string {
|
|
58
|
+
return isAllowedTabUrl(url) ? url : 'about:blank'
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function decodeSafeTabUrl(encodedUrl: unknown): string {
|
|
62
|
+
if (typeof encodedUrl !== 'string') return 'about:blank'
|
|
63
|
+
try {
|
|
64
|
+
return toSafeTabUrl(decodeURIComponent(encodedUrl))
|
|
65
|
+
} catch {
|
|
66
|
+
return 'about:blank'
|
|
67
|
+
}
|
|
8
68
|
}
|
|
9
69
|
|
|
10
70
|
/**
|
|
@@ -26,17 +86,87 @@ export function isCrossOriginUrl(url: string): boolean {
|
|
|
26
86
|
* 解析 URL 字符串为 path 和 query
|
|
27
87
|
* @param uri 完整 URL 或 path?query 字符串
|
|
28
88
|
*/
|
|
29
|
-
export function parseUrl(uri: string): { path: string; query:
|
|
30
|
-
const [pathPart, queryPart] = uri.split('?')
|
|
31
|
-
if (
|
|
32
|
-
return { path: pathPart
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
89
|
+
export function parseUrl(uri: string): { path: string; query: LocationQueryRaw } {
|
|
90
|
+
const [pathPart = '', queryPart] = uri.split('?')
|
|
91
|
+
if (queryPart === undefined) {
|
|
92
|
+
return { path: pathPart, query: {} }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const params = new URLSearchParams(queryPart)
|
|
96
|
+
const query: LocationQueryRaw = {}
|
|
97
|
+
for (const [key, value] of params.entries()) {
|
|
98
|
+
const existing = query[key]
|
|
99
|
+
if (existing === undefined) {
|
|
100
|
+
query[key] = value
|
|
101
|
+
continue
|
|
102
|
+
}
|
|
103
|
+
query[key] = Array.isArray(existing) ? [...existing, value] : [existing, value]
|
|
104
|
+
}
|
|
105
|
+
return { path: pathPart, query }
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** 浅克隆 LocationQueryRaw,避免引用共享导致的副作用 */
|
|
109
|
+
export function cloneLocationQuery(query: LocationQueryRaw = {}): LocationQueryRaw {
|
|
110
|
+
const cloned: LocationQueryRaw = {}
|
|
111
|
+
for (const [key, value] of Object.entries(query)) {
|
|
112
|
+
cloned[key] = Array.isArray(value) ? [...value] : value
|
|
113
|
+
}
|
|
114
|
+
return cloned
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface CloneablePage {
|
|
118
|
+
query?: LocationQueryRaw
|
|
119
|
+
_backParams?: Record<string, unknown>
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** 深克隆页面对象的 query 和 _backParams,防止跨页面引用污染 */
|
|
123
|
+
export function clonePage<T extends CloneablePage>(page: T): T {
|
|
124
|
+
return {
|
|
125
|
+
...page,
|
|
126
|
+
query: page.query ? cloneLocationQuery(page.query) : undefined,
|
|
127
|
+
_backParams: page._backParams ? { ...page._backParams } : undefined
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** 忽略 __tab/__src/_back 等内部保留 key 后比较两个 query 是否等价 */
|
|
132
|
+
export function isSameQueryIgnoringReserved(
|
|
133
|
+
a: LocationQueryRaw = {},
|
|
134
|
+
b: LocationQueryRaw = {}
|
|
135
|
+
): boolean {
|
|
136
|
+
const clean = (q: LocationQueryRaw): Record<string, string | string[]> => {
|
|
137
|
+
const result: Record<string, string | string[]> = {}
|
|
138
|
+
for (const [key, value] of Object.entries(q)) {
|
|
139
|
+
if (STACK_TABS_RESERVED_QUERY_KEYS.has(key) || key === '_back') continue
|
|
140
|
+
result[key] = Array.isArray(value) ? value.map((item) => String(item ?? '')) : String(value ?? '')
|
|
141
|
+
}
|
|
142
|
+
return result
|
|
143
|
+
}
|
|
144
|
+
const ca = clean(a)
|
|
145
|
+
const cb = clean(b)
|
|
146
|
+
const keysA = Object.keys(ca)
|
|
147
|
+
const keysB = Object.keys(cb)
|
|
148
|
+
if (keysA.length !== keysB.length) return false
|
|
149
|
+
return keysA.every((key) => {
|
|
150
|
+
const aValue = ca[key]
|
|
151
|
+
const bValue = cb[key]
|
|
152
|
+
if (Array.isArray(aValue) || Array.isArray(bValue)) {
|
|
153
|
+
return (
|
|
154
|
+
Array.isArray(aValue) &&
|
|
155
|
+
Array.isArray(bValue) &&
|
|
156
|
+
aValue.length === bValue.length &&
|
|
157
|
+
aValue.every((value, index) => value === bValue[index])
|
|
158
|
+
)
|
|
39
159
|
}
|
|
160
|
+
return aValue === bValue
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** 移除 query 中的 vue-stack-tabs 保留参数(__tab、__src),返回干净的 query */
|
|
165
|
+
export function omitStackTabsReservedQuery(query: LocationQueryRaw = {}): LocationQueryRaw {
|
|
166
|
+
const sanitized: LocationQueryRaw = {}
|
|
167
|
+
for (const [key, value] of Object.entries(query)) {
|
|
168
|
+
if (STACK_TABS_RESERVED_QUERY_KEYS.has(key)) continue
|
|
169
|
+
sanitized[key] = Array.isArray(value) ? [...value] : value
|
|
40
170
|
}
|
|
41
|
-
return
|
|
171
|
+
return sanitized
|
|
42
172
|
}
|
package/src/lib/versionLogger.ts
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** 在浏览器控制台输出带样式的库版本标识 */
|
|
3
2
|
const logVersion = (version: string) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const xml = `<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1167.06 237.75"><path d="M79.24,19.73h108.91v29.7h-108.91v-29.7Z" style="fill:#79a7ff; stroke-width:0px;"/><path d="M179.24,199.67H20.26c-11.21-.07-20.26-9.17-20.26-20.38V20.39C0,9.18,9.05.07,20.26,0h59.49c3.51.07,6.34,2.9,6.41,6.42v44.36c0,3.54-2.87,6.41-6.41,6.41s-6.41-2.86-6.42-6.4V12.36H20.25c-4.13.07-7.44,3.44-7.44,7.56v159.41c0,4.13,3.31,7.49,7.44,7.56h158.98c4.13-.07,7.44-3.44,7.44-7.56V51.84c0-3.54,2.87-6.41,6.41-6.42,3.55,0,6.42,2.87,6.42,6.42v127.45c0,11.21-9.05,20.32-20.26,20.39h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M192.8,60.77c-3.66-.07-6.61-3.02-6.68-6.68v-18.23c.09-4.29-3.32-7.83-7.6-7.92h-96.43c-3.69,0-6.69-2.99-6.69-6.69s2.99-6.69,6.69-6.69h96.27c11.69.08,21.13,9.58,21.13,21.27v18.25c0,3.69-2.99,6.68-6.68,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M193.08,58.67H10.15c-3.61-.08-6.48-3.07-6.41-6.68-.08-3.62,2.79-6.61,6.4-6.69,0,0,0,0,0,0h182.93c3.62.08,6.48,3.08,6.41,6.69.07,3.61-2.79,6.6-6.41,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M137.2,58.67c-3.42.24-6.4-2.32-6.68-5.74v-28.15c.55-3.69,4-6.24,7.69-5.69,2.94.44,5.24,2.75,5.69,5.69v28.15c-.28,3.42-3.26,5.98-6.68,5.74h-.02Z" style="fill:#377dff; stroke-width:0px;"/><path d="M99.78,100.48l-12.83-22.22h-18.39l31.22,54.05,31.22-54.05h-18.39l-12.83,22.22Z" style="fill:#00d797; stroke-width:0px;"/><path d="M135.28,78.26l-35.49,61.43-35.44-61.43h-20.11l55.55,96.2,55.55-96.2s-20.06,0-20.06,0ZM313.33,59.95c0,.52-.67,1.84-2,3.95s-3.3,5.2-5.9,9.28-5.75,9.28-9.46,15.61c-3.7,6.33-7.52,13.34-11.45,21.04-4.51,8.85-7.76,15.8-9.76,20.86s-2.99,9.41-2.99,13.05c0,2.89,1.53,5.44,4.6,7.63,3.7-2.89,7.34-6.33,10.93-10.32,3.58-3.99,7.13-8.44,10.63-13.36s7.55-11.13,12.14-18.65c4.6-7.52,8.69-14.43,12.27-20.73-.17-.52-.36-1.04-.56-1.56s-.3-.95-.3-1.3c0-2.72.55-5.26,1.65-7.63,1.1-2.37,2.47-4.68,4.12-6.94s4.12-5.44,7.42-9.54c.87-1.1,1.94-1.65,3.21-1.65,2.08,0,3.12,1.33,3.12,3.99s-1.08,6.84-3.25,12.53c-2.17,5.7-5.37,12.39-9.59,20.08s-9.47,16.29-15.74,25.81c-6.28,9.51-13.37,19.45-21.3,29.8-8.04,10.47-13.79,15.7-17.26,15.7-1.97,0-4.19-1.08-6.68-3.25s-4.63-5.13-6.42-8.89-2.69-7.78-2.69-12.06c0-2.54.53-5.81,1.6-9.8s2.75-8.78,5.03-14.36,4.87-11.09,7.76-16.53c3.01-5.72,5.65-10.47,7.94-14.23,2.28-3.76,4.87-7.94,7.76-12.53,2.89-4.6,4.34-7.1,4.34-7.5,0-.87-.58-1.3-1.73-1.3-3.35,0-7.82,1.71-13.4,5.12s-12.85,8.59-21.82,15.53c-3.41,2.66-5.57,4.38-6.46,5.16s-1.34,1.43-1.34,1.95c0,.69.55,1.04,1.65,1.04.46,0,2.02-.17,4.68-.52s4.77-.52,6.33-.52c2.6,0,3.9.46,3.9,1.39,0,.81-.54,1.45-1.61,1.91-1.07.46-2.54.93-4.42,1.39s-4.44,1.1-7.68,1.91c-3.47.93-7.16,2.25-11.06,3.99-3.9,1.73-6.14,2.6-6.72,2.6-1.1,0-1.78-.4-2.04-1.21s-.39-2.14-.39-3.99c0-8.21,1.36-14.56,4.08-19.04s7.58-9.15,14.57-14.01c7.98-5.55,15.61-10.16,22.9-13.84,7.29-3.67,13.58-6.36,18.87-8.07s9.18-2.56,11.67-2.56,4.84,1.56,7.24,4.68,3.6,6.42,3.6,9.89h0ZM366.34,124.75c-8.39,11.1-14.76,19-19.13,23.68s-7.94,7.03-10.71,7.03c-2.2,0-4.22-.91-6.07-2.73-1.85-1.82-3.28-4.28-4.29-7.37s-1.52-6.4-1.52-9.93c0-2.31.22-4.39.65-6.25.43-1.85,1.26-3.89,2.47-6.12s2.82-4.64,4.81-7.24c2-2.6,4.44-5.55,7.33-8.85,1.73-2.02,3.19-3.73,4.38-5.12,1.18-1.39,2.34-2.33,3.47-2.82s2.96-.74,5.51-.74c1.85,0,3.61.25,5.29.74,1.68.49,2.52,1,2.52,1.52,0,1.04-.85,2.92-2.56,5.64s-4.45,6.03-8.24,9.93c-3.79,3.9-8.17,7.74-13.14,11.49-1.1,3.41-1.65,6.01-1.65,7.81,0,2.49.95,3.73,2.86,3.73.69,0,1.85-.59,3.47-1.78,1.62-1.18,4.35-3.47,8.2-6.85,3.84-3.38,7.3-6.38,10.37-8.98,2.25-1.97,4.87-4.9,7.85-8.8s5.39-6.84,7.24-8.8c4.28-4.51,7.2-7.44,8.76-8.8s3.06-2.04,4.51-2.04,2.33.43,2.82,1.3c.49.87.74,2.63.74,5.29,0,1.21-.12,2.2-.35,2.95s-.71,1.72-1.43,2.91-2.18,3.37-4.38,6.55-4.8,6.94-7.81,11.28c-1.66,2.38-3.09,4.93-4.25,7.59-1.21,2.75-1.82,4.81-1.82,6.2,0,3.01,1.18,4.51,3.56,4.51,1.96,0,4.25-.81,6.85-2.43s6.59-4.54,11.97-8.76v5.81c-6.77,6.25-11.77,10.79-15.01,13.62s-6.04,4.97-8.41,6.42-4.63,2.17-6.77,2.17c-4.86,0-7.29-2.89-7.29-8.67,0-2.2.72-5.16,2.17-8.89,1.44-3.73,3.79-9.12,7.03-16.18v-.02Z" style="fill:#306fff; stroke-width:0px;"/><path d="M407.71,133.77v2.17c0,3.41.84,6.07,2.52,7.98,1.68,1.91,3.87,2.86,6.59,2.86s5.77-.66,8.8-2c3.04-1.33,6.06-3.09,9.07-5.29s6.68-5.15,11.02-8.85v5.29c-6.54,7.87-12.67,13.89-18.39,18.09-5.72,4.19-11.54,6.29-17.44,6.29-5.15,0-9.22-2-12.23-5.99s-4.51-9.46-4.51-16.39c0-6.07,1.42-11.58,4.25-16.52s7.46-10.16,13.88-15.66c4.39-3.76,8.76-6.59,13.1-8.5s8.21-2.86,11.62-2.86c2.72,0,4.87.62,6.46,1.86s2.39,3.11,2.39,5.59c0,3.64-1.36,7.27-4.08,10.89s-6.87,7.2-12.45,10.76c-5.58,3.56-12.45,6.98-20.6,10.28h0ZM408.58,128.13c5.2-2.02,9.66-4.54,13.36-7.55,3.7-3.01,6.43-5.88,8.2-8.63,1.76-2.75,2.65-4.76,2.65-6.03s-.61-2-1.82-2c-1.04,0-2.73.67-5.07,2s-4.71,3.07-7.11,5.21-4.55,4.66-6.46,7.55c-1.9,2.86-3.17,6.08-3.73,9.46h-.02ZM585.37,132.9c-1.45-2.66-3.61-5.06-6.51-7.2-2.89-2.14-6.15-3.86-9.76-5.16s-7.39-2.27-11.32-2.91c-11.68-1.74-22.58-5.52-32.7-11.36-.87-.46-1.79-1.44-2.78-2.95-.98-1.5-1.47-2.95-1.47-4.34,0-5.09.85-10.19,2.56-15.31,1.71-5.12,3.89-9.12,6.55-12.01,4.28-4.8,11.98-8.99,23.12-12.58,11.13-3.58,23.67-5.38,37.6-5.38,8.33,0,14.76.64,19.3,1.91s6.81,3.24,6.81,5.9c0,4.34-.59,7.69-1.78,10.06s-2.46,3.95-3.82,4.73c-1.36.78-3.75,1.84-7.16,3.17-3.64,1.27-6.81,2.6-9.5,3.99s-4.99,2.72-6.9,3.99c-1.91,1.27-3.09,1.91-3.56,1.91-.58,0-.87-.23-.87-.69,0-.98,1.03-2.47,3.08-4.47s4.58-3.74,7.59-5.25c3.18-1.68,4.77-2.75,4.77-3.21,0-.75-1.76-1.13-5.29-1.13-10.7,0-20.59.95-29.67,2.86s-16.24,4.42-21.47,7.55c-5.23,3.12-7.85,6.3-7.85,9.54,0,2.02,1.08,3.46,3.25,4.29,2.17.84,6.95,2.24,14.36,4.21,7.4,1.97,14.02,4.22,19.86,6.77,8.38,3.59,14.6,7.32,18.65,11.19,4.05,3.88,6.07,8.21,6.07,13.01,0,3.3-.8,6.61-2.39,9.93-1.59,3.33-3.92,6.38-6.98,9.15-3.07,2.78-6.59,5.06-10.58,6.85-3.41,1.45-7.71,2.8-12.88,4.08-5.18,1.27-10.79,2.27-16.83,2.99-6.04.72-11.81,1.08-17.31,1.08-10.12,0-18.26-.95-24.42-2.86s-9.24-4.8-9.24-8.67c0-1.74,1.04-4.44,3.12-8.11s4.54-6.14,7.37-7.42c2.49-.98,4.89-1.55,7.2-1.69,2.31-.14,3.47.13,3.47.82,0,.17-.09.35-.26.52s-.38.32-.61.43c-.23.12-.46.23-.69.35-1.16.46-2.1.82-2.82,1.08-.72.26-1.3.52-1.74.78-.43.26-.65.62-.65,1.08,0,1.21,5.99,1.82,17.96,1.82,10.41,0,18.94-.38,25.59-1.13s12.52-2.11,17.61-4.08c5.09-1.97,9.71-4.68,13.88-8.15l.04.02ZM640.8,85.63h3.73c3.06-5.49,5.84-9.38,8.33-11.67,2.49-2.28,5.32-3.43,8.5-3.43s4.77.72,4.77,2.17c0,.69-1.24,2.57-3.73,5.64s-4.37,5.64-5.64,7.72c1.96.23,3.71.43,5.25.61,1.53.17,2.73.32,3.6.43-3.3,6.13-7.43,12.4-12.4,18.82l-4.08-.3c-1.1-.09-2.21-.17-3.34-.26s-2.5-.19-4.12-.3c-3.12,5.03-5.74,9.53-7.85,13.49s-3.73,7.59-4.86,10.89-1.69,6.42-1.69,9.37c0,3.99,1.59,5.99,4.77,5.99,2.2,0,5.07-1.17,8.63-3.51s8.31-5.94,14.27-10.8v5.81c-15.61,16.95-27.15,25.42-34.61,25.42-2.6,0-4.7-1.01-6.29-3.04-1.59-2.02-2.38-4.63-2.38-7.81,0-2.14.45-4.68,1.34-7.63.9-2.95,2.5-7.4,4.81-13.36-.81.69-1.58,1.37-2.3,2.04s-1.39,1.27-2,1.82-1.26,1.13-1.95,1.73c-.69.61-1.39,1.23-2.08,1.87v-5.99c6.07-5.09,13.42-14.02,22.03-26.8-.87-.06-1.68-.1-2.43-.13s-1.65-.04-2.69-.04c-3.41,0-5.96.23-7.63.69-.69.17-1.34.36-1.95.56s-1.03.3-1.26.3-.35-.17-.35-.52c0-1.91,1.18-4.77,3.56-8.59,1.91-3.24,3.72-5.64,5.42-7.2,1.71-1.56,3.79-2.62,6.25-3.17,2.46-.55,5.91-.82,10.37-.82h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M664.91,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM706.46,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M779.07,130.82v5.81c-6.19,6.07-11.23,10.79-15.14,14.14-3.9,3.35-7.55,5.96-10.93,7.81-3.38,1.85-6.69,2.78-9.93,2.78s-6.1-1.26-8.76-3.77c-2.66-2.52-4.74-5.81-6.25-9.89-1.5-4.08-2.26-8.4-2.26-12.97,0-3.93.87-7.43,2.6-10.5,1.74-3.07,5.09-7.03,10.06-11.88,5.9-5.78,11.38-10.25,16.44-13.4s9.04-4.73,11.93-4.73c2.08,0,3.85.72,5.29,2.17s2.17,3.27,2.17,5.46c0,1.85-.95,4.48-2.86,7.89-1.91,3.41-4.05,6.38-6.42,8.89-2.37,2.52-4.25,3.77-5.64,3.77-1.5,0-2.25-.81-2.25-2.43.06-.46.1-.9.13-1.3s.04-.81.04-1.21c0-.69-.25-1.08-.74-1.17s-1.08.13-1.78.65c-5.78,4.05-9.75,6.9-11.88,8.54-2.14,1.65-3.83,3.31-5.07,4.99s-1.87,3.44-1.87,5.29c0,3.41,1.1,6.19,3.3,8.33s5.06,3.21,8.59,3.21,8.02-1.4,13.14-4.21c5.12-2.8,11.15-6.9,18.09-12.27h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M844.13,130.65v5.81c-6.48,7.58-11.91,13.32-16.31,17.22s-8.07,5.86-11.02,5.86-5.39-.84-7.68-2.52c-2.29-1.68-4.34-3.99-6.16-6.94-1.82-2.95-3.98-7.05-6.46-12.32-2.95,3.64-5.61,7.04-7.98,10.19-2.37,3.15-4.02,5.25-4.94,6.29-.93,1.04-1.77,1.56-2.52,1.56-1.56,0-2.69-1-3.38-2.99-.69-2-1.04-4.9-1.04-8.72,0-5.21.62-10.22,1.87-15.05,1.24-4.83,3.04-9.53,5.38-14.1s5.35-9.5,9.02-14.79c3.67-5.29,7.79-10.83,12.36-16.61,6.3-7.98,11.74-14.5,16.31-19.56,4.57-5.06,8.54-8.88,11.93-11.45,3.38-2.57,6.2-3.86,8.46-3.86,2.78,0,4.16,1.24,4.16,3.73,0,2.14-5.12,9.85-15.35,23.12-10.24,13.27-25.16,31.39-44.76,54.35v7.46c13.13-14.05,23.69-24.49,31.71-31.31,8.01-6.82,14.21-10.24,18.61-10.24,1.79,0,3.18,1.06,4.16,3.17s1.47,4.55,1.47,7.33c0,5.67-2.43,10.92-7.29,15.74-4.86,4.83-12.32,10.37-22.38,16.61,1.74,2.6,3.27,4.5,4.6,5.68,1.33,1.19,3.01,1.78,5.03,1.78,1.79,0,3.73-.61,5.81-1.82s4.21-2.75,6.38-4.6,5.51-4.86,10.02-9.02h-.01ZM809.86,135.07c2.2-1.45,4.93-3.69,8.2-6.72,3.27-3.04,6.06-6.19,8.37-9.46s3.47-6,3.47-8.2c0-.92-.41-1.39-1.21-1.39-2.2,0-5.97,2.11-11.32,6.33-5.35,4.22-10.57,9.63-15.66,16.22,2.2,0,4.92,1.07,8.15,3.21h0ZM951.78,140.71l2.86,2.17c-.75,1.62-1.47,3.04-2.17,4.25-.69,1.21-1.53,2.69-2.52,4.42-.98,1.73-1.73,3.04-2.25,3.9-4.34,7.58-8.41,11.36-12.23,11.36-1.62,0-3.01-.64-4.16-1.91-1.16-1.27-1.73-3.01-1.73-5.2,0-3.12,1.11-7.4,3.34-12.84,2.23-5.43,5.67-12.13,10.32-20.08s10.51-16.96,17.57-27.02c7.05-10.06,15.01-20.67,23.85-31.84-5.09-.75-11.13-1.13-18.13-1.13-8.04,0-16.99.9-26.85,2.69s-18.45,3.86-25.76,6.2c-7.32,2.34-10.97,4.06-10.97,5.16,0,.41.14.68.43.82.29.15.77.26,1.43.35s1.52.19,2.56.3c6.77.93,10.15,1.97,10.15,3.12,0,.58-1.47.85-4.42.82s-6.51-.04-10.67-.04c-3.3,0-5.68-.13-7.16-.39s-2.46-.75-2.95-1.47-.74-1.84-.74-3.34c0-.98.29-3.12.87-6.42,1.1-6.13,2.79-11.04,5.07-14.75,2.28-3.7,5.78-6.72,10.5-9.06,4.71-2.34,11.2-4.21,19.47-5.59,13.88-2.37,25.36-3.56,34.44-3.56,6.71,0,12,.27,15.88.82,3.87.55,6.72,1.34,8.54,2.39,1.82,1.04,2.98,2.07,3.47,3.08s1.14,2.76,1.95,5.25l2.69,7.98c.17.52.32.94.43,1.26.12.32.22.65.3,1,.09.35.13.67.13.95,0,2.26-.51,4.28-1.52,6.07s-2.86,4.48-5.55,8.07-4.67,6.39-5.94,8.41c-14.92,24.23-25.1,42.16-30.53,53.78v.02ZM991.94,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM1033.49,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1111.3,130.82v5.64c-6.02,3.82-10.76,5.72-14.23,5.72-1.91,0-3.93-.32-6.07-.95-5.2,6.59-9.67,11.42-13.4,14.49s-7.47,4.6-11.23,4.6c-4.34,0-7.68-2.29-10.02-6.85-2.34-4.57-3.51-10.24-3.51-17,0-9.2,2.78-19.21,8.33-30.06,5.56-10.85,12.29-21.07,20.08-30.45,7.84-9.46,15.43-17.28,22.77-23.46,7.34-6.19,12.32-9.28,14.92-9.28s3.73,1.71,3.73,5.12c0,15.15-19.43,41.58-58.29,79.29-.12,1.04-.17,3.09-.17,6.16,0,7.98,2.14,11.97,6.42,11.97,1.68,0,3.37-.68,5.07-2.04,1.71-1.36,4.32-3.95,7.85-7.76-1.39-3.12-2.08-5.44-2.08-6.94,0-3.18,1.3-6.62,3.9-10.32s5.57-6.9,8.89-9.59c3.33-2.69,5.74-4.03,7.24-4.03,2.37,0,3.56,1.71,3.56,5.12,0,2.6-.68,5.72-2.04,9.37-1.36,3.64-3.34,7.81-5.94,12.49.98.81,1.76,1.4,2.34,1.78s1.45.56,2.6.56c2.66,0,5.75-1.18,9.28-3.56v-.02ZM1067.24,117.81c3.01-2.6,6.03-5.68,9.06-9.24s7.47-9.01,13.32-16.35c5.61-7.05,10.02-12.94,13.23-17.65s5.62-8.63,7.24-11.75c1.62-3.12,2.43-5.26,2.43-6.42,0-.87-.23-1.3-.69-1.3-1.27,0-3.92,2.1-7.94,6.29-4.02,4.19-8.6,9.93-13.75,17.22-7.11,10.06-12.26,17.64-15.44,22.73-3.18,5.09-5.67,10.58-7.46,16.48h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1110.96,133.08v-2.08c14.92-15.73,25.18-26.75,30.79-33.05,1.27-7.11,4.34-10.67,9.19-10.67,1.21,0,2.52.35,3.9,1.04l.52,1.65c-.23.69-.35,1.68-.35,2.95,0,1.1.42,3.14,1.26,6.12s1.49,5.48,1.95,7.5.69,4.31.69,6.85c0,3.82-.87,7.48-2.6,10.97-1.73,3.5-4.25,6.85-7.55,10.06-3.3,3.21-7.55,6.49-12.75,9.85,2.08.35,3.73.52,4.94.52,2.37,0,4.93-.59,7.68-1.78,2.75-1.18,5.55-2.78,8.41-4.77,2.86-2,6.2-4.58,10.02-7.76v5.81c-7.4,7.23-14.02,12.71-19.86,16.44s-10.87,5.59-15.09,5.59c-5.44,0-10.47-2.31-15.09-6.94-2.72-2.78-4.41-5.43-5.08-7.98-.67-2.54-1-5.99-1-10.32h.02ZM1143.31,119.8l-1.56-12.66c-3.59,4.05-11.25,11.83-22.99,23.33,3.47.75,5.84,1.76,7.11,3.04,1.27,1.27,3.06,3.73,5.38,7.37,3.93-1.62,6.95-3.83,9.07-6.64,2.11-2.8,3.17-6.64,3.17-11.49,0-.58-.01-1.1-.04-1.56s-.07-.92-.13-1.39h0Z" style="fill:#306fff; stroke-width:0px;"/><g style="isolation:isolate;"><text transform="translate(943.45 229.96)" style="fill:#00d797; font-family:ArialMT, Arial; font-size:24px; isolation:isolate;"><tspan x="0" y="0">version: ${version}</tspan></text></g></svg>`
|
|
7
|
-
const svg64 = encode(xml)
|
|
8
|
-
const b64Start = 'data:image/svg+xml;base64,'
|
|
9
|
-
const image64 = b64Start + svg64
|
|
10
|
-
const style =
|
|
11
|
-
'font-size: 1px; padding: ' +
|
|
12
|
-
Math.floor(height / 4) +
|
|
13
|
-
'px ' +
|
|
14
|
-
Math.floor(width / 2) +
|
|
15
|
-
'px; line-height: ' +
|
|
16
|
-
Math.floor(height / 2) +
|
|
17
|
-
'px;'
|
|
3
|
+
if (typeof window === 'undefined') return
|
|
4
|
+
|
|
18
5
|
window.console.log(
|
|
19
|
-
'%c' +
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
'%c vue-stack-tabs %c v' + version + ' %c',
|
|
7
|
+
'background:#306fff; padding:2px 8px; border-radius:3px 0 0 3px; color:#fff;',
|
|
8
|
+
'background:#00d797; padding:2px 8px; border-radius:0 3px 3px 0; color:#fff;',
|
|
9
|
+
'background:transparent'
|
|
22
10
|
)
|
|
23
11
|
}
|
|
24
12
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(N,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],o):(N=typeof globalThis<"u"?globalThis:N||self,o(N["vue-stack-tabs"]={},N.Vue,N.vueRouter))})(this,(function(N,o,ke){"use strict";const an=Object.freeze(Object.defineProperty({__proto__:null,default:{VueStackTab:{close:"close",closeLeft:"close left",closeRight:"close right",closeOthers:"close others",closeAll:"close all",reload:"reload",reloadAll:"reload all",maximum:"maximum",restore:"restore",undefined:"undefined",loading:"loading",openInNewWindow:"Open in new window"}}},Symbol.toStringTag,{value:"Module"})),cn=Object.freeze(Object.defineProperty({__proto__:null,default:{VueStackTab:{close:"关闭",closeLeft:"关闭左侧",closeRight:"关闭右侧",closeOthers:"关闭其他",closeAll:"关闭所有",reload:"刷新",reloadAll:"刷新所有",maximum:"最大化",restore:"还原",undefined:"未命名",loading:"加载中",openInNewWindow:"在新窗口打开"}}},Symbol.toStringTag,{value:"Module"}));const ln=["__proto__","prototype","constructor"];function fn(e){const t=typeof e;return e!==null&&(t==="object"||t==="function")}function dn(e){return!(Array.isArray(e)?e.length:Object.keys(e).length)}function un(e){return!e.some(t=>ln.indexOf(t)!==-1)}function hn(e){const t=e.split("."),n=[];for(let s=0;s<t.length;s++){let r=t[s];for(;r[r.length-1]==="\\"&&t[s+1]!==void 0;)r=r.slice(0,-1)+".",r+=t[++s];n.push(r)}return un(n)?n:[]}function rt(e,t){if(!fn(e))return"";const n=hn(t);if(n.length===0)return"";let s=Object.assign({},e);for(let r=0;r<n.length;r++){if(typeof s[n[r]]=="string")return s[n[r]];if(s=s[n[r]],s==null){if(r!==n.length-1)return"";break}}return""}function pn(e,t){if(Array.isArray(t)){const n={},s=[...e.matchAll(/{(.+?)}/g)];return s&&s.forEach((r,i)=>{t[i]&&(n[r[1]]=t[i])}),n}return t}function bn(e,t){for(const n in t)e=e.replace(`{${n}}`,String(t[n]));return e}function it(e,t){return Object.keys(t).forEach(n=>{t[n]instanceof Object&&n in e&&(t[n]={...t[n],...it(e[n],t[n])})}),{...e||{},...t}}const mn=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",at=(e=>mn?Symbol(e):"_vt_"+e)("i18n");function he(){return o.inject(at)}function gn(e){const t=Object.assign({locale:"en",fallbackLocale:"en",messages:{}},e),n=o.ref(t.locale),s=o.reactive({});return Object.entries(t.messages).forEach(([r,i])=>{s[r]=i}),{t(r,i){if(!r)return"";const a=typeof i=="string"&&i?i:n.value;let f=rt(s[a],r)||rt(s[t.fallbackLocale],r);if(i&&typeof i!="string"){const c=pn(f,i);dn(c)||(f=bn(f,c))}return f||r},current:o.readonly(n),options:o.readonly(e||{}),install(r){const i=this;r.config.globalProperties.$t=i.t,r.provide(at,i)},changeLocale(r){n.value=r},setLocaleMessage(r,i){s[r]=it(o.toRaw(s[r]||{}),i)},getLocaleMessage(r){return s[r]||{}}}}const yn=()=>{const e=Object.assign({"./lang/en.ts":an,"./lang/zh-CN.ts":cn});function t(r,i){for(const a in r){const f=r[a];if(f?.default){const c=a.substring(a.lastIndexOf("/")+1,a.lastIndexOf(".")),l=i[c];i[c]=l?{...l,...f.default}:f.default}}}const n=()=>{const r={};return t(e,r),r};return{getI18n:r=>{const i={...n()};if(r)for(const a of r)i[a.locale]=a.messages;return gn({locale:"zh-CN",fallbackLocale:"en",messages:i})}}},ct=({wrap:e,left:t=0,top:n=0,smooth:s=!0})=>{e&&(e.scrollTo?e.scrollTo({left:t,top:n,behavior:s?"smooth":"auto"}):(e.scrollLeft=t,e.scrollTop=n))};function vn({el:e,wrap:t,block:n="start",inline:s="nearest"}){const r=t&&typeof t=="object"&&"value"in t?t.value:t;if(!(!e||!r))if(e.scrollIntoView)e.scrollIntoView({behavior:"smooth",block:n,inline:s});else{const{offsetLeft:i,offsetTop:a}=e;let f,c;n==="center"?c=a+(e.clientHeight-r.clientHeight)/2:c=a,s==="center"?f=i+(e.clientWidth-r.clientWidth)/2:f=i,ct({wrap:r,left:f,top:c})}}const Pe=(e=".stack-tab__container *")=>{const t=Array.from(document.querySelectorAll(e)).map(n=>+window.getComputedStyle(n).zIndex||0);return t.length?Math.max(...t.filter(n=>n<9e4))+1:1};function lt(e){return!!(e&&/^(javascript|data):/i.test(e))}function ft(e){if(!e||!/^https?:\/\//i.test(e))return!1;try{const t=typeof window<"u"?window.location:{origin:"http://localhost"};return new URL(e,t.origin).origin!==t.origin}catch{return!0}}function $e(e){const[t,n]=e.split("?");if(!n)return{path:t??"",query:{}};const s={};for(const r of n.split("&")){const[i,a]=r.split("=");i!=null&&a!=null&&a!==""&&(s[i]=a)}return{path:t??"",query:s}}var Y=(e=>(e.WHEEL="wheel",e.BUTTON="button",e.BOTH="both",e))(Y||{});class xe{items;constructor(t){if(this.items=new Map,t)for(const n of t)this.push(n)}push(t){this.items.set(this.items.size,t)}pop(){if(this.isEmpty())return;const t=this.items.get(this.items.size-1);return this.items.delete(this.items.size-1),t}peek(){if(!this.isEmpty())return this.items.get(this.items.size-1)}isEmpty(){return this.items.size===0}size(){return this.items.size}clear(){this.items.clear()}list(){return Array.from(this.items.values())}toString(){if(this.isEmpty())return"";let t="";return this.items.forEach((n,s)=>{t=`${t}${s===0?"":", "}${n}`}),t}toJSON(){return Array.from(this.items.values())}}function Tn(e,t,n){var s={},r=s.noTrailing,i=r===void 0?!1:r,a=s.noLeading,f=a===void 0?!1:a,c=s.debounceMode,l=c===void 0?void 0:c,m,h=!1,b=0;function I(){m&&clearTimeout(m)}function O(A){var y=A||{},E=y.upcomingOnly,_=E===void 0?!1:E;I(),h=!_}function M(){for(var A=arguments.length,y=new Array(A),E=0;E<A;E++)y[E]=arguments[E];var _=this,p=Date.now()-b;if(h)return;function k(){b=Date.now(),t.apply(_,y)}function d(){m=void 0}!f&&l&&!m&&k(),I(),l===void 0&&p>e?f?(b=Date.now(),i||(m=setTimeout(l?d:k,e))):k():i!==!0&&(m=setTimeout(l?d:k,l===void 0?e-p:e))}return M.cancel=O,M}function We(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ue(e,t,n=".",s){if(!We(t))return Ue(e,{},n,s);const r=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const a=e[i];a!=null&&(s&&s(r,i,a,n)||(Array.isArray(a)&&Array.isArray(r[i])?r[i]=[...a,...r[i]]:We(a)&&We(r[i])?r[i]=Ue(a,r[i],(n?`${n}.`:"")+i.toString(),s):r[i]=a))}return r}function wn(e){return(...t)=>t.reduce((n,s)=>Ue(n,s,"",e),{})}const q=wn(),dt="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Ee=32,kn=16,ut=10,ht=0xffffffffffff;var se;(function(e){e.Base32IncorrectEncoding="B32_ENC_INVALID",e.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",e.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",e.EncodeTimeNegative="ENC_TIME_NEG",e.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",e.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",e.PRNGDetectFailure="PRNG_DETECT",e.ULIDInvalid="ULID_INVALID",e.Unexpected="UNEXPECTED",e.UUIDInvalid="UUID_INVALID"})(se||(se={}));class pe extends Error{constructor(t,n){super(`${n} (${t})`),this.name="ULIDError",this.code=t}}function xn(e){const t=Math.floor(e()*Ee)%Ee;return dt.charAt(t)}function En(e){const t=_n(),n=t&&(t.crypto||t.msCrypto)||null;if(typeof n?.getRandomValues=="function")return()=>{const s=new Uint8Array(1);return n.getRandomValues(s),s[0]/256};if(typeof n?.randomBytes=="function")return()=>n.randomBytes(1).readUInt8()/256;throw new pe(se.PRNGDetectFailure,"Failed to find a reliable PRNG")}function _n(){return On()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function Sn(e,t){let n="";for(;e>0;e--)n=xn(t)+n;return n}function An(e,t=ut){if(isNaN(e))throw new pe(se.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>ht)throw new pe(se.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${ht}: ${e}`);if(e<0)throw new pe(se.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new pe(se.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let n,s="";for(let r=t;r>0;r--)n=e%Ee,s=dt.charAt(n)+s,e=(e-n)/Ee;return s}function On(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function _e(e,t){const n=En(),s=Date.now();return An(s,ut)+Sn(kn,n)}var Fe={exports:{}},pt;function In(){return pt||(pt=1,(function(e){var t=(function(){var n=String.fromCharCode,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(c,l){if(!i[c]){i[c]={};for(var m=0;m<c.length;m++)i[c][c.charAt(m)]=m}return i[c][l]}var f={compressToBase64:function(c){if(c==null)return"";var l=f._compress(c,6,function(m){return s.charAt(m)});switch(l.length%4){default:case 0:return l;case 1:return l+"===";case 2:return l+"==";case 3:return l+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:f._decompress(c.length,32,function(l){return a(s,c.charAt(l))})},compressToUTF16:function(c){return c==null?"":f._compress(c,15,function(l){return n(l+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:f._decompress(c.length,16384,function(l){return c.charCodeAt(l)-32})},compressToUint8Array:function(c){for(var l=f.compress(c),m=new Uint8Array(l.length*2),h=0,b=l.length;h<b;h++){var I=l.charCodeAt(h);m[h*2]=I>>>8,m[h*2+1]=I%256}return m},decompressFromUint8Array:function(c){if(c==null)return f.decompress(c);for(var l=new Array(c.length/2),m=0,h=l.length;m<h;m++)l[m]=c[m*2]*256+c[m*2+1];var b=[];return l.forEach(function(I){b.push(n(I))}),f.decompress(b.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":f._compress(c,6,function(l){return r.charAt(l)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),f._decompress(c.length,32,function(l){return a(r,c.charAt(l))}))},compress:function(c){return f._compress(c,16,function(l){return n(l)})},_compress:function(c,l,m){if(c==null)return"";var h,b,I={},O={},M="",A="",y="",E=2,_=3,p=2,k=[],d=0,w=0,g;for(g=0;g<c.length;g+=1)if(M=c.charAt(g),Object.prototype.hasOwnProperty.call(I,M)||(I[M]=_++,O[M]=!0),A=y+M,Object.prototype.hasOwnProperty.call(I,A))y=A;else{if(Object.prototype.hasOwnProperty.call(O,y)){if(y.charCodeAt(0)<256){for(h=0;h<p;h++)d=d<<1,w==l-1?(w=0,k.push(m(d)),d=0):w++;for(b=y.charCodeAt(0),h=0;h<8;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}else{for(b=1,h=0;h<p;h++)d=d<<1|b,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=0;for(b=y.charCodeAt(0),h=0;h<16;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}E--,E==0&&(E=Math.pow(2,p),p++),delete O[y]}else for(b=I[y],h=0;h<p;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1;E--,E==0&&(E=Math.pow(2,p),p++),I[A]=_++,y=String(M)}if(y!==""){if(Object.prototype.hasOwnProperty.call(O,y)){if(y.charCodeAt(0)<256){for(h=0;h<p;h++)d=d<<1,w==l-1?(w=0,k.push(m(d)),d=0):w++;for(b=y.charCodeAt(0),h=0;h<8;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}else{for(b=1,h=0;h<p;h++)d=d<<1|b,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=0;for(b=y.charCodeAt(0),h=0;h<16;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}E--,E==0&&(E=Math.pow(2,p),p++),delete O[y]}else for(b=I[y],h=0;h<p;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1;E--,E==0&&(E=Math.pow(2,p),p++)}for(b=2,h=0;h<p;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1;for(;;)if(d=d<<1,w==l-1){k.push(m(d));break}else w++;return k.join("")},decompress:function(c){return c==null?"":c==""?null:f._decompress(c.length,32768,function(l){return c.charCodeAt(l)})},_decompress:function(c,l,m){var h=[],b=4,I=4,O=3,M="",A=[],y,E,_,p,k,d,w,g={val:m(0),position:l,index:1};for(y=0;y<3;y+=1)h[y]=y;for(_=0,k=Math.pow(2,2),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;switch(_){case 0:for(_=0,k=Math.pow(2,8),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;w=n(_);break;case 1:for(_=0,k=Math.pow(2,16),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;w=n(_);break;case 2:return""}for(h[3]=w,E=w,A.push(w);;){if(g.index>c)return"";for(_=0,k=Math.pow(2,O),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;switch(w=_){case 0:for(_=0,k=Math.pow(2,8),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;h[I++]=n(_),w=I-1,b--;break;case 1:for(_=0,k=Math.pow(2,16),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;h[I++]=n(_),w=I-1,b--;break;case 2:return A.join("")}if(b==0&&(b=Math.pow(2,O),O++),h[w])M=h[w];else if(w===I)M=E+E.charAt(0);else return null;A.push(M),h[I++]=E+M.charAt(0),b--,E=M,b==0&&(b=Math.pow(2,O),O++)}}};return f})();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(Fe)),Fe.exports}var bt=In();const Mn=new TextEncoder,Cn=new TextDecoder("utf-8",{ignoreBOM:!0}),mt={encode:e=>Mn.encode(e),decode:e=>Cn.decode(e)},gt=(()=>{const t=[..."0123456789abcdef"],n=new Array(256);for(let s=0;s<256;s++)n[s]=`${t[s>>>4&15]}${t[s&15]}`;return n})(),Bn=(()=>{const e={};for(let t=0;t<256;t++){const n=gt[t],s=n[0],r=s.toUpperCase(),i=n[1],a=i.toUpperCase();e[n]=t,e[`${s}${a}`]=t,e[`${r}${i}`]=t,e[`${r}${a}`]=t}return e})(),He={encode:e=>{let t="";for(let n=0,s=e.length;n<s;n++)t+=gt[e[n]];return t},encodeStr:e=>He.encode(mt.encode(e)),decode:e=>{const t=e.length/2,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=Bn[e.slice(s*2,s*2+2)];return n},decodeStr:e=>mt.decode(He.decode(e)),is:e=>!(e.length%2||!/^[a-fA-F0-9]*$/.test(e))};function Rn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ge(e,t=""){if(!Number.isSafeInteger(e)||e<0){const n=t&&`"${t}" `;throw new Error(`${n}expected integer >= 0, got ${e}`)}}function be(e,t,n=""){const s=Rn(e),r=e?.length,i=t!==void 0;if(!s||i&&r!==t){const a=n&&`"${n}" `,f=i?` of length ${t}`:"",c=s?`length=${r}`:`type=${typeof e}`;throw new Error(a+"expected Uint8Array"+f+", got "+c)}return e}function qe(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function yt(e,t){be(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function Ln(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function Se(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Ae(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Oe(e,t){return e<<32-t|e>>>t}const vt=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Tt(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Nn=vt?e=>e:e=>Tt(e);function zn(e){for(let t=0;t<e.length;t++)e[t]=Tt(e[t]);return e}const D=vt?e=>e:zn;function Vn(e,t={}){const n=(r,i)=>e(i).update(r).digest(),s=e(void 0);return n.outputLen=s.outputLen,n.blockLen=s.blockLen,n.create=r=>e(r),Object.assign(n,t),Object.freeze(n)}const Dn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ie=BigInt(2**32-1),wt=BigInt(32);function kt(e,t=!1){return t?{h:Number(e&Ie),l:Number(e>>wt&Ie)}:{h:Number(e>>wt&Ie)|0,l:Number(e&Ie)|0}}function J(e,t,n,s,r){return e=e+t+r|0,s=Oe(s^e,16),n=n+s|0,t=Oe(t^n,12),{a:e,b:t,c:n,d:s}}function Q(e,t,n,s,r){return e=e+t+r|0,s=Oe(s^e,8),n=n+s|0,t=Oe(t^n,7),{a:e,b:t,c:n,d:s}}class Pn{buffer;buffer32;finished=!1;destroyed=!1;length=0;pos=0;blockLen;outputLen;constructor(t,n){Ge(t),Ge(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Se(this.buffer)}update(t){qe(this),be(t);const{blockLen:n,buffer:s,buffer32:r}=this,i=t.length,a=t.byteOffset,f=t.buffer;for(let c=0;c<i;){this.pos===n&&(D(r),this.compress(r,0,!1),D(r),this.pos=0);const l=Math.min(n-this.pos,i-c),m=a+c;if(l===n&&!(m%4)&&c+l<i){const h=new Uint32Array(f,m,Math.floor((i-c)/4));D(h);for(let b=0;c+n<i;b+=r.length,c+=n)this.length+=n,this.compress(h,b,!1);D(h);continue}s.set(t.subarray(c,c+l),this.pos),this.pos+=l,this.length+=l,c+=l}return this}digestInto(t){qe(this),yt(t,this);const{pos:n,buffer32:s}=this;this.finished=!0,Ae(this.buffer.subarray(n)),D(s),this.compress(s,0,!0),D(s);const r=Se(t);this.get().forEach((i,a)=>r[a]=Nn(i))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){const{buffer:n,length:s,finished:r,destroyed:i,outputLen:a,pos:f}=this;return t||=new this.constructor({dkLen:a}),t.set(...this.get()),t.buffer.set(n),t.destroyed=i,t.finished=r,t.length=s,t.pos=f,t.outputLen=a,t}clone(){return this._cloneInto()}}function xt(e,t,n,s,r,i,a,f,c,l,m,h,b,I,O,M,A,y,E,_){let p=0;for(let k=0;k<s;k++)({a:r,b:c,c:b,d:A}=J(r,c,b,A,n[t+e[p++]])),{a:r,b:c,c:b,d:A}=Q(r,c,b,A,n[t+e[p++]]),{a:i,b:l,c:I,d:y}=J(i,l,I,y,n[t+e[p++]]),{a:i,b:l,c:I,d:y}=Q(i,l,I,y,n[t+e[p++]]),{a,b:m,c:O,d:E}=J(a,m,O,E,n[t+e[p++]]),{a,b:m,c:O,d:E}=Q(a,m,O,E,n[t+e[p++]]),{a:f,b:h,c:M,d:_}=J(f,h,M,_,n[t+e[p++]]),{a:f,b:h,c:M,d:_}=Q(f,h,M,_,n[t+e[p++]]),{a:r,b:l,c:O,d:_}=J(r,l,O,_,n[t+e[p++]]),{a:r,b:l,c:O,d:_}=Q(r,l,O,_,n[t+e[p++]]),{a:i,b:m,c:M,d:A}=J(i,m,M,A,n[t+e[p++]]),{a:i,b:m,c:M,d:A}=Q(i,m,M,A,n[t+e[p++]]),{a,b:h,c:b,d:y}=J(a,h,b,y,n[t+e[p++]]),{a,b:h,c:b,d:y}=Q(a,h,b,y,n[t+e[p++]]),{a:f,b:c,c:I,d:E}=J(f,c,I,E,n[t+e[p++]]),{a:f,b:c,c:I,d:E}=Q(f,c,I,E,n[t+e[p++]]);return{v0:r,v1:i,v2:a,v3:f,v4:c,v5:l,v6:m,v7:h,v8:b,v9:I,v10:O,v11:M,v12:A,v13:y,v14:E,v15:_}}const U={CHUNK_START:1,CHUNK_END:2,PARENT:4,ROOT:8,KEYED_HASH:16,DERIVE_KEY_CONTEXT:32,DERIVE_KEY_MATERIAL:64},j=Dn.slice(),Et=(()=>{const e=Array.from({length:16},(s,r)=>r),t=s=>[2,6,3,10,7,0,4,13,1,11,12,5,9,14,15,8].map(r=>s[r]),n=[];for(let s=0,r=e;s<7;s++,r=t(r))n.push(...r);return Uint8Array.from(n)})();class je extends Pn{chunkPos=0;chunksDone=0;flags=0;IV;state;stack=[];posOut=0;bufferOut32=new Uint32Array(16);bufferOut;chunkOut=0;enableXOF=!0;constructor(t={},n=0){super(64,t.dkLen===void 0?32:t.dkLen);const{key:s,context:r}=t,i=r!==void 0;if(s!==void 0){if(i)throw new Error('Only "key" or "context" can be specified at same time');be(s,32,"key");const a=s.slice();this.IV=Se(a),D(this.IV),this.flags=n|U.KEYED_HASH}else if(i){be(r,void 0,"context");const a=r,f=new je({dkLen:32},U.DERIVE_KEY_CONTEXT).update(a).digest();this.IV=Se(f),D(this.IV),this.flags=n|U.DERIVE_KEY_MATERIAL}else this.IV=j.slice(),this.flags=n;this.state=this.IV.slice(),this.bufferOut=Ln(this.bufferOut32)}get(){return[]}set(){}b2Compress(t,n,s,r=0){const{state:i,pos:a}=this,{h:f,l:c}=kt(BigInt(t),!0),{v0:l,v1:m,v2:h,v3:b,v4:I,v5:O,v6:M,v7:A,v8:y,v9:E,v10:_,v11:p,v12:k,v13:d,v14:w,v15:g}=xt(Et,r,s,7,i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],j[0],j[1],j[2],j[3],f,c,a,n);i[0]=l^y,i[1]=m^E,i[2]=h^_,i[3]=b^p,i[4]=I^k,i[5]=O^d,i[6]=M^w,i[7]=A^g}compress(t,n=0,s=!1){let r=this.flags;if(this.chunkPos||(r|=U.CHUNK_START),(this.chunkPos===15||s)&&(r|=U.CHUNK_END),s||(this.pos=this.blockLen),this.b2Compress(this.chunksDone,r,t,n),this.chunkPos+=1,this.chunkPos===16||s){let i=this.state;this.state=this.IV.slice();for(let a,f=this.chunksDone+1;(s||!(f&1))&&(a=this.stack.pop());f>>=1)this.buffer32.set(a,0),this.buffer32.set(i,8),this.pos=this.blockLen,this.b2Compress(0,this.flags|U.PARENT,this.buffer32,0),i=this.state,this.state=this.IV.slice();this.chunksDone++,this.chunkPos=0,this.stack.push(i)}this.pos=0}_cloneInto(t){t=super._cloneInto(t);const{IV:n,flags:s,state:r,chunkPos:i,posOut:a,chunkOut:f,stack:c,chunksDone:l}=this;return t.state.set(r.slice()),t.stack=c.map(m=>Uint32Array.from(m)),t.IV.set(n),t.flags=s,t.chunkPos=i,t.chunksDone=l,t.posOut=a,t.chunkOut=f,t.enableXOF=this.enableXOF,t.bufferOut32.set(this.bufferOut32),t}destroy(){this.destroyed=!0,Ae(this.state,this.buffer32,this.IV,this.bufferOut32),Ae(...this.stack)}b2CompressOut(){const{state:t,pos:n,flags:s,buffer32:r,bufferOut32:i}=this,{h:a,l:f}=kt(BigInt(this.chunkOut++));D(r);const{v0:c,v1:l,v2:m,v3:h,v4:b,v5:I,v6:O,v7:M,v8:A,v9:y,v10:E,v11:_,v12:p,v13:k,v14:d,v15:w}=xt(Et,0,r,7,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],j[0],j[1],j[2],j[3],f,a,n,s);i[0]=c^A,i[1]=l^y,i[2]=m^E,i[3]=h^_,i[4]=b^p,i[5]=I^k,i[6]=O^d,i[7]=M^w,i[8]=t[0]^A,i[9]=t[1]^y,i[10]=t[2]^E,i[11]=t[3]^_,i[12]=t[4]^p,i[13]=t[5]^k,i[14]=t[6]^d,i[15]=t[7]^w,D(r),D(i),this.posOut=0}finish(){if(this.finished)return;this.finished=!0,Ae(this.buffer.subarray(this.pos));let t=this.flags|U.ROOT;this.stack.length?(t|=U.PARENT,D(this.buffer32),this.compress(this.buffer32,0,!0),D(this.buffer32),this.chunksDone=0,this.pos=this.blockLen):t|=(this.chunkPos?0:U.CHUNK_START)|U.CHUNK_END,this.flags=t,this.b2CompressOut()}writeInto(t){qe(this,!1),be(t),this.finish();const{blockLen:n,bufferOut:s}=this;for(let r=0,i=t.length;r<i;){this.posOut>=n&&this.b2CompressOut();const a=Math.min(n-this.posOut,i-r);t.set(s.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible after digest call");return this.writeInto(t)}xof(t){return Ge(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(yt(t,this),this.finished)throw new Error("digest() was already called");return this.enableXOF=!1,this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}}const $n=Vn((e={})=>new je(e)),Ze=e=>{const t=e.iframeRefreshMode==="reload"?"R":"P",n=`${e.id}|${e.title}|${e.iframe?"Y":"N"}|${e.closable?"Y":"N"}|${e.refreshable?"Y":"N"}|${t}`;return bt.compressToEncodedURIComponent(n)},Wn=e=>{const n=bt.decompressFromEncodedURIComponent(e).split("|"),s=n[5]==="R"?"reload":"postMessage";return{id:n[0]??"",title:n[1]??"",iframe:n[2]==="Y",closable:n[3]==="Y",refreshable:n[4]==="Y",iframeRefreshMode:s}},_t=(e,t,n)=>{const s=[];for(const a in n)a.startsWith("__")||s.push({key:a,value:n[a]});s.sort((a,f)=>{let c=0;return a.key>f.key?c=1:a.key<f.key&&(c=-1),c});const r=new TextEncoder().encode(`${e}|${t}|${JSON.stringify(s)}`),i=$n(r);return He.encode(i)};function Un(e){return{all:e=e||new Map,on:function(t,n){var s=e.get(t);s?s.push(n):e.set(t,[n])},off:function(t,n){var s=e.get(t);s&&(n?s.splice(s.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var s=e.get(t);s&&s.slice().map(function(r){r(n)}),(s=e.get("*"))&&s.slice().map(function(r){r(t,n)})}}}const Fn=Un(),Hn={install(e){e.provide("tabEmitter",Fn)}},re=()=>o.inject("tabEmitter");var P=(e=>(e.PAGE_LOADING="PAGE_LOADING",e.TAB_ACTIVE="TAB_ACTIVE",e))(P||{});const Gn=o.defineComponent({__name:"PageLoading",props:{tabId:{}},setup(e){const t=e,n=re(),s=o.ref(!1),r=a=>{a.tId===t.tabId&&(s.value=a.value)},i=P.PAGE_LOADING;return n.on(i,r),o.onUnmounted(()=>{n.off(i,r)}),(a,f)=>s.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"stack-tab-loading-mask",style:o.normalizeStyle({zIndex:o.unref(Pe)(".cache-page-wrapper *")})},[...f[0]||(f[0]=[o.createElementVNode("div",{class:"stack-tab-loading--spin turn"},null,-1)])],4)):o.createCommentVNode("",!0)}}),z=o.ref([]),fe=o.ref([]),Z=new Map,ee=new Set,K=new Set,Ke=o.ref(0),ie=o.ref([]),ae=new Map,St=o.ref(!1),qn="stacktab-active-tab",te=o.ref({});let Me=0,At=!1,Ot="";const jn=e=>{Me=e},Zn=e=>{At=e},Kn=e=>{Ot=e},Xe=e=>{ee.add(e)},me=e=>{for(const t of e.pages.list())Xe(t.id);K.add(e.id)},Xn=e=>{for(const t of e.pages.list())Xe(t.id)},ge=e=>{fe.value.includes(e)||fe.value.push(e)},It=e=>{const t=fe.value.indexOf(e);t>=0&&fe.value.splice(t,1)},Yn=e=>{e&&(ee.delete(e),It(e),Z.delete(e))},ne=()=>{if(ee.size>0){for(const e of[...ee])Yn(e);ee.clear()}},Jn=e=>{const t=ae.get(e);if(t)for(const[n,s]of t){const r=document.querySelector(n);r&&(r.scrollTop=s.top,r.scrollLeft=s.left)}},Qn=e=>{const t=ae.get(e);if(t)for(const n of t.keys()){const s=document.querySelector(n);t.set(n,{top:s?.scrollTop??0,left:s?.scrollLeft??0})}},eo=e=>{const t=ae.get(e);t&&(t.clear(),ae.delete(e))},Mt=(e,...t)=>{ae.has(e)||ae.set(e,new Map);const n=ae.get(e);for(const s of t)n.set(s,{top:0,left:0})},Ye=()=>Ot+qn,Ct=e=>{e.id&&window.sessionStorage.setItem(Ye(),JSON.stringify(e))},Bt=()=>{window.sessionStorage.removeItem(Ye())},to=e=>e==null?null:JSON.parse(e,(t,n)=>t==="pages"?new xe(n):n),Rt=o.defineComponent({name:"StackTabEmptyPlaceholder",setup(){return()=>null}}),no=e=>{const n=e.matched[e.matched.length-1]?.path??e.path,s=e.path.endsWith("/")?e.path.slice(0,-1):e.path;return n===s?s:e.path},Ce=()=>{const e=ke.useRouter(),t=re(),{t:n}=he(),s=()=>z.value.length,r=T=>{for(const x of T){const S=q(x,{id:_e(),refreshable:!0,closable:!0,iframe:!1}),B=S.id??_e();S.id=B;const L=$e(S.path),W=q(S,{closable:!0,refreshable:!0,iframe:!1}),De=_t(B,L.path,L.query),ot={id:De,tabId:B,path:L.path,query:q(L.query,{__tab:Ze(S)})},ue=new xe;ue.push(ot);const st={id:B,title:W.title??"",closable:W.closable,refreshable:W.refreshable,iframe:W.iframe,iframeRefreshMode:W.iframeRefreshMode==="reload"?"reload":"postMessage",active:!1,pages:ue};ge(De),z.value.push({...st})}const v=sessionStorage.getItem(Ye()),u=to(v);u&&!z.value.some(x=>x.id===u.id)&&(u.iframe&&u.url&&u.iframeRefreshMode===void 0&&(u.iframeRefreshMode=ft(u.url)?"reload":"postMessage"),z.value.push(u)),St.value=!0},i=T=>z.value.some(v=>v.id===T),a=()=>Me<=0||Me>0&&Me>z.value.length,f=T=>(z.value.push(T),Promise.resolve(!0)),c=T=>z.value.find(v=>v.id===T)??null,l=T=>{if(T.query.__tab)return Wn(T.query.__tab);const v={id:_e(),title:n("VueStackTab.undefined"),closable:!0,refreshable:!0,iframe:!1};return T.query.__tab=Ze(v),v},m=(T,v,u,x)=>{let S=null;for(const B of z.value)B.active=!1,B.id===T.id&&(S=B);if(S===null){const B=new xe;B.push(x);const L=v.query.__src;S={id:T.id,title:T.title,closable:T.closable,refreshable:T.refreshable,iframe:T.iframe,iframeRefreshMode:T.iframeRefreshMode??"postMessage",url:decodeURIComponent(L),active:!0,pages:B},f(S).then(()=>{t.emit(P.TAB_ACTIVE,{id:T.id,isRoute:!1})})}else S.active=!0,(S.pages.isEmpty()||S.pages.peek().id!==x.id)&&S.pages.push(x);return S},h=T=>{const v=l(T);if(K.has(v.id))return{empty:!0};const u=no(T),x=_t(v.id,u,T.query.valueOf());if(ee.has(x)){ee.delete(x);const L=Z.get(x);if(L)return{recovered:L,cacheName:x}}const S={id:x,tabId:v.id,path:T.path,query:T.query},B=m(v,T,x,S);return Ct(B),{cacheName:x,tabInfo:v,targetTab:B}},b=(T,v)=>{const{cacheName:u,tabInfo:x}=T;if(Z.has(u))return ge(u),Z.get(u);const S=o.defineComponent({name:u,components:{DynamicComponent:v},emits:["onLoaded"],setup(B,L){return o.onMounted(()=>{L.emit("onLoaded"),Mt(u,".cache-page-wrapper")}),o.onDeactivated(()=>Qn(u)),o.onActivated(()=>{L.emit("onLoaded"),Jn(u),ne(),K.clear(),I(u),v.props=null}),o.onUnmounted(()=>eo(u)),()=>o.createVNode("div",{class:"cache-page-wrapper",id:"W-"+x.id,style:[At?"overflow:auto":"overflow:hidden"]},[o.createVNode(o.resolveComponent("dynamic-component"),{tId:x.id,pId:u},null),o.createVNode(Gn,{tabId:x.id},null)])}});return Z.set(u,S),ge(u),S},I=T=>{ie.value=ie.value.filter(v=>v!==T)},O=(T,v)=>{if(!v)return Rt;const u=h(T);return"empty"in u?Rt:"recovered"in u?(ge(u.cacheName),u.recovered):b(u,v)},M=T=>{const v=c(T.id);v&&(Xn(v),ne(),v.pages.clear())},A=T=>{let v="";const u=c(T),x=z.value,S=x.findIndex(L=>L?.id===T);if(S<0)return"";const B=x[S];return B.closable?(me(B),B.pages.clear(),x.length>1&&B.active&&(v=(S===0?x[1]:x[S-1])?.id??""),x.splice(S,1),v&&t.emit(P.TAB_ACTIVE,{id:v}),u?.active||(ne(),K.clear()),v):T},y=()=>{const T=z.value;for(let x=T.length-1;x>=0;x--){const S=T[x];S?.closable&&(me(S),S.pages.clear(),T.splice(x,1))}if(T.some(x=>x.active)){ne(),K.clear();return}const u=T[T.length-1];u&&t.emit(P.TAB_ACTIVE,{id:u.id})};return{tabs:z,caches:fe,refreshKey:Ke,excludedCacheIdsForRefresh:ie,isInitialized:St,setMaxSize:jn,canAddTab:a,initialize:r,size:s,active:(T,v=!0)=>{t.emit("FORWARD");const u=c(T);if(u&&!u.active){for(const x of z.value)x.active=x.id===T;if(Ct(u),z.value=z.value.slice(),v){const x=u.pages.peek();x&&e.push({path:x.path,query:x.query})}}},destroy:()=>{z.value.length=0,ee.clear(),K.clear(),te.value={},fe.value.length=0,Z.clear(),Bt()},reset:()=>y(),addCache:ge,removeCache:It,getTab:c,addTab:f,removeTab:A,removeAllTabs:y,removeLeftTabs:T=>{const v=z.value,u=v.findIndex(S=>S?.id===T);if(u<=0)return;for(let S=u-1;S>=0;S--){const B=v[S];B?.closable&&(me(B),B.pages.clear(),v.splice(S,1))}if(v.some(S=>S.active)){ne(),K.clear();return}const x=v[0];x&&t.emit(P.TAB_ACTIVE,{id:x.id})},removeRightTabs:T=>{const v=z.value,u=v.findIndex(S=>S?.id===T);if(u<0||u>=v.length-1)return;for(let S=v.length-1;S>u;S--){const B=v[S];B?.closable&&(me(B),B.pages.clear(),v.splice(S,1))}if(v.some(S=>S.active)){ne(),K.clear();return}const x=v[v.length-1];x&&t.emit(P.TAB_ACTIVE,{id:x.id})},removeOtherTabs:T=>{const v=z.value;let u;for(let x=v.length-1;x>=0;x--){const S=v[x];S&&(S.id===T?u=S:S.closable&&(me(S),S.pages.clear(),v.splice(x,1)))}u&&!u.active?t.emit(P.TAB_ACTIVE,{id:T}):(ne(),K.clear())},hasTab:i,renewTab:M,addPage:O,addComponent:(T,v)=>Z.set(T,v),getComponent:T=>Z.get(T),removeComponent:T=>Z.delete(T),markCacheForEviction:Xe,evictMarkedCaches:ne,refreshTab:T=>{const v=c(T);if(!v?.refreshable)return;if(v.iframe){v.iframeRefreshMode==="reload"?te.value={...te.value,[T]:(te.value[T]??0)+1}:t.emit("REFRESH_IFRAME_POSTMESSAGE",T);return}const u=v.pages.peek()?.id;u&&(ie.value=[...ie.value,u],v.active&&Ke.value++)},refreshAllTabs:()=>{const T=[];for(const v of z.value)if(v?.refreshable)if(v.iframe)v.iframeRefreshMode==="reload"?te.value={...te.value,[v.id]:(te.value[v.id]??0)+1}:t.emit("REFRESH_IFRAME_POSTMESSAGE",v.id);else{const u=v.pages.peek()?.id;u&&T.push(u)}T.length>0&&(ie.value=[...ie.value,...T],Ke.value++)},iframeRefreshKeys:te,addPageScroller:Mt,setGlobalScroll:Zn,clearSession:Bt,setSessionPrefix:Kn}};let Lt;function Be(){const e=ke.useRouter(),t=re(),{active:n,hasTab:s,refreshKey:r,reset:i,canAddTab:a,renewTab:f,getTab:c,tabs:l,removeTab:m,removeAllTabs:h,refreshTab:b,refreshAllTabs:I}=Ce(),O=p=>{const k={refreshable:!0,closable:!0,iframe:!1};p.iframe&&p.iframeRefreshMode===void 0?k.iframeRefreshMode=ft(p.path??"")?"reload":"postMessage":p.iframe&&(k.iframeRefreshMode=p.iframeRefreshMode??"postMessage");const d=q(p,k);return d.id||(d.id=_e()),d},M=Tn(500,(p,k=!1)=>new Promise((d,w)=>{const g=O(p);if(s(g.id)&&!k){t.emit(P.TAB_ACTIVE,{id:g.id}),d(g.id);return}if(g.id&&k&&s(g.id)&&(f(p),c(p.id)?.active&&r.value++),!a()){w(new Error("Max Size"));return}A(p,g),d(g.id)})),A=(p,k)=>{const d=Ze(k);let w=q({__tab:d},p.query),g;if(p.iframe)w.__src=encodeURIComponent(p.path),g=Lt;else{const V=$e(p.path);g=V.path,w=q(V.query,w)}e.push({path:g,query:w})};return{openTab:M,closeTab:m,closeAllTabs:h,refreshTab:b,refreshAllTabs:I,activeTab:n,reset:i,tabs:l,setIFramePath:p=>{Lt=p},getWrapper:()=>document.getElementsByClassName("cache-page-wrapper")[0],openInNewWindow:p=>{const k=c(p);k?.iframe&&k.url&&window.open(k.url,"_blank","noopener,noreferrer")}}}const oo={class:"stack-tab__contextmenu-item"},X=o.defineComponent({__name:"ContextMenuItem",props:{icon:{},title:{}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",oo,[o.createElementVNode("div",{class:o.normalizeClass(["stack-tab__contextmenu-icon",e.icon])},null,2),o.createElementVNode("div",{style:{"margin-left":"8px"},onContextmenu:n[0]||(n[0]=o.withModifiers(()=>{},["prevent"]))},o.toDisplayString(e.title),33)]))}}),so={key:1,class:"divider div-transparent"},ro=((e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n})(o.defineComponent({__name:"index",props:{index:{},left:{default:0},top:{default:0},contextMenu:{default:()=>[]},tabItem:{},max:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,{t:r}=he(),i=o.ref(),a=o.reactive({left:n.left,top:n.top}),{closeTab:f,closeAllTabs:c,refreshTab:l,refreshAllTabs:m,openInNewWindow:h}=Be(),{removeLeftTabs:b,removeRightTabs:I,removeOtherTabs:O}=Ce(),M=A=>{A?.(),s("close")};return o.onMounted(()=>{const A=i.value?.clientWidth??0;a.left+A>window.innerWidth&&(a.left=window.innerWidth-A-5)}),(A,y)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"menuElementRef",ref:i,class:"stack-tab__contextmenu",style:o.normalizeStyle({left:`${a.left}px`,top:`${a.top}px`,"z-index":o.unref(Pe)(".stack-tab,.stack-tab *")})},[o.createVNode(X,{icon:"stack-tab__icon-reload svg-mask",title:o.unref(r)("VueStackTab.reload"),disabled:e.tabItem.refreshable?null:"disabled",onClick:y[0]||(y[0]=E=>M(()=>o.unref(l)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-reload-all svg-mask",title:o.unref(r)("VueStackTab.reloadAll"),onClick:y[1]||(y[1]=E=>M(o.unref(m)))},null,8,["title"]),o.createVNode(X,{icon:"stack-tab__icon-close svg-mask",title:o.unref(r)("VueStackTab.close"),disabled:e.tabItem.closable?null:"disabled",onClick:y[2]||(y[2]=E=>M(()=>o.unref(f)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-close-lefts svg-mask",title:o.unref(r)("VueStackTab.closeLeft"),disabled:e.index<=0?"disabled":null,onClick:y[3]||(y[3]=E=>M(()=>o.unref(b)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-close-rights svg-mask",title:o.unref(r)("VueStackTab.closeRight"),disabled:e.index>=e.max-1?"disabled":null,onClick:y[4]||(y[4]=E=>M(()=>o.unref(I)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-close-others svg-mask",title:o.unref(r)("VueStackTab.closeOthers"),onClick:y[5]||(y[5]=E=>M(()=>o.unref(O)(e.tabItem.id)))},null,8,["title"]),o.createVNode(X,{icon:"stack-tab__icon-close-all svg-mask",title:o.unref(r)("VueStackTab.closeAll"),onClick:y[6]||(y[6]=E=>M(o.unref(c)))},null,8,["title"]),e.tabItem.iframe&&e.tabItem.url?(o.openBlock(),o.createBlock(X,{key:0,icon:"stack-tab__icon-open svg-mask",title:o.unref(r)("VueStackTab.openInNewWindow"),onClick:y[7]||(y[7]=E=>M(()=>o.unref(h)(e.tabItem.id)))},null,8,["title"])):o.createCommentVNode("",!0),e.contextMenu!==void 0&&e.contextMenu.length>0?(o.openBlock(),o.createElementBlock("div",so)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.contextMenu,(E,_)=>(o.openBlock(),o.createBlock(X,{key:_,icon:E.icon,title:E.title,disabled:E.disabled(e.tabItem)?"disabled":null,onClick:p=>M(()=>!E.disabled(e.tabItem)&&E.callback(e.tabItem.id))},null,8,["icon","title","disabled","onClick"]))),128))],4))}}),[["__scopeId","data-v-6f704637"]]),io=()=>{const e=o.reactive({item:{},index:-1,left:0,top:0,max:0}),t=o.ref(!1),n=r=>{r.target.closest?.(".stack-tab__contextmenu")||(t.value=!1,document.removeEventListener("click",n))};return o.onUnmounted(()=>{document.removeEventListener("click",n)}),{shown:t,contextMenuData:e,showContextMenu:async(r,i,a,f)=>{t.value=!1,document.removeEventListener("click",n),await o.nextTick(()=>{const{clientY:c,clientX:l}=r;t.value=!0,Object.assign(e,{item:i,index:a,top:c,left:l,max:f}),o.nextTick(()=>document.addEventListener("click",n))})}}},ao={class:"stack-tab__item-title"},co=["title"],lo=["title"],fo=o.defineComponent({__name:"TabHeaderItem",props:{item:{}},emits:["close","active"],setup(e,{emit:t}){const n=t,s=re(),{t:r}=he(),i=o.ref(),a=e,f=b=>{a.item.id===b.id&&h(b.isRoute??!0)},c=P.TAB_ACTIVE;s.on(c,f),o.onUnmounted(()=>{s.off(c,f)});const l=o.computed(()=>a.item.title||r("undefined")),m=()=>{n("close",a.item)},h=(b=!0)=>{n("active",a.item,i.value,b)};return(b,I)=>(o.openBlock(),o.createElementBlock("li",{ref_key:"tabElementRef",ref:i,class:o.normalizeClass(["stack-tab__item",{"is-active":e.item.active,"is-icon":e.item.closable}]),onClick:I[0]||(I[0]=O=>h(!0))},[o.createElementVNode("div",ao,[o.createElementVNode("div",{class:"stack-tab__item-title-content",title:l.value},o.toDisplayString(l.value),9,co)]),e.item.closable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"stack-tab__icon-close-fill stack-tab__item-button",title:o.unref(r)("VueStackTab.close"),onClick:o.withModifiers(m,["stop"])},null,8,lo)):o.createCommentVNode("",!0)],2))}});var ce=[],uo=function(){return ce.some(function(e){return e.activeTargets.length>0})},ho=function(){return ce.some(function(e){return e.skippedTargets.length>0})},Nt="ResizeObserver loop completed with undelivered notifications.",po=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Nt}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Nt),window.dispatchEvent(e)},ye;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ye||(ye={}));var le=function(e){return Object.freeze(e)},bo=(function(){function e(t,n){this.inlineSize=t,this.blockSize=n,le(this)}return e})(),zt=(function(){function e(t,n,s,r){return this.x=t,this.y=n,this.width=s,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,le(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,s=t.y,r=t.top,i=t.right,a=t.bottom,f=t.left,c=t.width,l=t.height;return{x:n,y:s,top:r,right:i,bottom:a,left:f,width:c,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Je=function(e){return e instanceof SVGElement&&"getBBox"in e},Vt=function(e){if(Je(e)){var t=e.getBBox(),n=t.width,s=t.height;return!n&&!s}var r=e,i=r.offsetWidth,a=r.offsetHeight;return!(i||a||e.getClientRects().length)},Dt=function(e){var t;if(e instanceof Element)return!0;var n=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},mo=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ve=typeof window<"u"?window:{},Re=new WeakMap,Pt=/auto|scroll/,go=/^tb|vertical/,yo=/msie|trident/i.test(ve.navigator&&ve.navigator.userAgent),F=function(e){return parseFloat(e||"0")},de=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new bo((n?t:e)||0,(n?e:t)||0)},$t=le({devicePixelContentBoxSize:de(),borderBoxSize:de(),contentBoxSize:de(),contentRect:new zt(0,0,0,0)}),Wt=function(e,t){if(t===void 0&&(t=!1),Re.has(e)&&!t)return Re.get(e);if(Vt(e))return Re.set(e,$t),$t;var n=getComputedStyle(e),s=Je(e)&&e.ownerSVGElement&&e.getBBox(),r=!yo&&n.boxSizing==="border-box",i=go.test(n.writingMode||""),a=!s&&Pt.test(n.overflowY||""),f=!s&&Pt.test(n.overflowX||""),c=s?0:F(n.paddingTop),l=s?0:F(n.paddingRight),m=s?0:F(n.paddingBottom),h=s?0:F(n.paddingLeft),b=s?0:F(n.borderTopWidth),I=s?0:F(n.borderRightWidth),O=s?0:F(n.borderBottomWidth),M=s?0:F(n.borderLeftWidth),A=h+l,y=c+m,E=M+I,_=b+O,p=f?e.offsetHeight-_-e.clientHeight:0,k=a?e.offsetWidth-E-e.clientWidth:0,d=r?A+E:0,w=r?y+_:0,g=s?s.width:F(n.width)-d-k,V=s?s.height:F(n.height)-w-p,$=g+A+k+E,T=V+y+p+_,v=le({devicePixelContentBoxSize:de(Math.round(g*devicePixelRatio),Math.round(V*devicePixelRatio),i),borderBoxSize:de($,T,i),contentBoxSize:de(g,V,i),contentRect:new zt(h,c,g,V)});return Re.set(e,v),v},Ut=function(e,t,n){var s=Wt(e,n),r=s.borderBoxSize,i=s.contentBoxSize,a=s.devicePixelContentBoxSize;switch(t){case ye.DEVICE_PIXEL_CONTENT_BOX:return a;case ye.BORDER_BOX:return r;default:return i}},vo=(function(){function e(t){var n=Wt(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=le([n.borderBoxSize]),this.contentBoxSize=le([n.contentBoxSize]),this.devicePixelContentBoxSize=le([n.devicePixelContentBoxSize])}return e})(),Ft=function(e){if(Vt(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},To=function(){var e=1/0,t=[];ce.forEach(function(a){if(a.activeTargets.length!==0){var f=[];a.activeTargets.forEach(function(l){var m=new vo(l.target),h=Ft(l.target);f.push(m),l.lastReportedSize=Ut(l.target,l.observedBox),h<e&&(e=h)}),t.push(function(){a.callback.call(a.observer,f,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,s=t;n<s.length;n++){var r=s[n];r()}return e},Ht=function(e){ce.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Ft(r.target)>e?n.activeTargets.push(r):n.skippedTargets.push(r))})})},wo=function(){var e=0;for(Ht(e);uo();)e=To(),Ht(e);return ho()&&po(),e>0},Qe,Gt=[],ko=function(){return Gt.splice(0).forEach(function(e){return e()})},xo=function(e){if(!Qe){var t=0,n=document.createTextNode(""),s={characterData:!0};new MutationObserver(function(){return ko()}).observe(n,s),Qe=function(){n.textContent="".concat(t?t--:t++)}}Gt.push(e),Qe()},Eo=function(e){xo(function(){requestAnimationFrame(e)})},Le=0,_o=function(){return!!Le},So=250,Ao={attributes:!0,characterData:!0,childList:!0,subtree:!0},qt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],jt=function(e){return e===void 0&&(e=0),Date.now()+e},et=!1,Oo=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=So),!et){et=!0;var s=jt(t);Eo(function(){var r=!1;try{r=wo()}finally{if(et=!1,t=s-jt(),!_o())return;r?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Ao)};document.body?n():ve.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),qt.forEach(function(n){return ve.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),qt.forEach(function(n){return ve.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e})(),tt=new Oo,Zt=function(e){!Le&&e>0&&tt.start(),Le+=e,!Le&&tt.stop()},Io=function(e){return!Je(e)&&!mo(e)&&getComputedStyle(e).display==="inline"},Mo=(function(){function e(t,n){this.target=t,this.observedBox=n||ye.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Ut(this.target,this.observedBox,!0);return Io(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Co=(function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e})(),Ne=new WeakMap,Kt=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ze=(function(){function e(){}return e.connect=function(t,n){var s=new Co(t,n);Ne.set(t,s)},e.observe=function(t,n,s){var r=Ne.get(t),i=r.observationTargets.length===0;Kt(r.observationTargets,n)<0&&(i&&ce.push(r),r.observationTargets.push(new Mo(n,s&&s.box)),Zt(1),tt.schedule())},e.unobserve=function(t,n){var s=Ne.get(t),r=Kt(s.observationTargets,n),i=s.observationTargets.length===1;r>=0&&(i&&ce.splice(ce.indexOf(s),1),s.observationTargets.splice(r,1),Zt(-1))},e.disconnect=function(t){var n=this,s=Ne.get(t);s.observationTargets.slice().forEach(function(r){return n.unobserve(t,r.target)}),s.activeTargets.splice(0,s.activeTargets.length)},e})(),Xt=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ze.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Dt(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ze.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Dt(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ze.unobserve(this,t)},e.prototype.disconnect=function(){ze.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();const Bo=["disabled","title"],Ro={key:1,class:"stack-tab__button"},Ve=o.defineComponent({__name:"TabHeaderButton",props:{disabled:{type:Boolean,default:!1},shadow:{default:null},iconClass:{default:""},title:{default:""}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["stack-tab__header-button",{"stack-tab__shadow-right":e.shadow==="right","stack-tab__shadow-left":e.shadow==="left"}]),disabled:e.disabled?"disabled":null,title:e.title},["icon"in t.$slots?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["stack-tab__mask-button",e.iconClass])},null,2)),"icon"in t.$slots?(o.openBlock(),o.createElementBlock("div",Ro,[o.renderSlot(t.$slots,"icon")])):o.createCommentVNode("",!0)],10,Bo))}}),Lo=o.defineComponent({__name:"TabHeaderScroll",props:{space:{default:300},isScrollWheel:{type:Boolean,default:!0},isScrollButton:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=o.ref(null),s=o.ref(null),r=o.ref(null),i=o.ref(!1),a=o.ref(!1),f=o.ref(!1),c=o.ref(!0),l=o.ref(),m=e,h=o.reactive({clientWidth:0,scrollWidth:0,scrollLeft:0}),b=o.reactive({thumbLeft:0,startScrollLeft:0,startThumbLeft:0,startPageX:0});o.watch(h,u=>{I(u)});const I=u=>{a.value=u.scrollLeft<=10,f.value=u.clientWidth+u.scrollLeft-u.scrollWidth>=-10,c.value=u.scrollWidth!==u.clientWidth},O=o.computed(()=>h.scrollWidth>h.clientWidth),M=o.computed(()=>{if(!O.value)return 0;const{clientWidth:u,scrollWidth:x}=h;return u/x*u}),A=o.computed(()=>{if(!O.value)return 0;const{clientWidth:u,scrollWidth:x,scrollLeft:S}=h;return(u-M.value)*(S/(x-u))}),y=()=>{if(!n.value)return;const{clientWidth:u,scrollWidth:x,scrollLeft:S}=n.value;Object.assign(h,{clientWidth:u,scrollWidth:x,scrollLeft:S})},E=()=>{const u=n.value?.querySelector(".stack-tab__item.is-active");u&&!v(u)&&T(u)},_=new Xt(()=>{y(),E()}),p=new Xt(()=>{O.value||E(),y()}),k=(u,x=!0)=>{ct({wrap:n.value,left:u,top:0,smooth:x})},d=u=>{k(n.value.scrollLeft+u)},w=u=>{const x=u.deltaY<0;k(n.value.scrollLeft+(x?-m.space:m.space))},g=u=>{Object.assign(b,{startPageX:u.pageX,startScrollLeft:n.value?.scrollLeft,startThumbLeft:A.value,thumbLeft:A.value}),i.value=!0,document.addEventListener("mousemove",V),document.addEventListener("mouseup",$)},V=u=>{const{clientWidth:x,scrollWidth:S}=h;let B=b.startThumbLeft+u.pageX-b.startPageX;const L=x-M.value;B<0?B=0:B>L&&(B=L),b.thumbLeft=B,k(B*(S-x)/(x-M.value),!1),u.preventDefault()},$=()=>{i.value=!1,document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",$)};o.onMounted(()=>{_.observe(l.value);const u=n.value?.querySelector(".stack-tab__nav");p.observe(u)}),o.onUnmounted(()=>{_.disconnect(),p.disconnect()});const T=u=>{vn({el:u,wrap:n.value,block:"end",inline:"center"})},v=u=>{if(!O.value)return!0;const x=u.offsetLeft,S=n.value.scrollLeft;return!(x<S||x+u.clientWidth>S+n.value.clientWidth)};return t({scrollIntoView:T,isInView:v}),(u,x)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[c.value?(o.openBlock(),o.createBlock(Ve,{key:0,"icon-class":"stack-tab__icon-left-arrow",disabled:a.value,onClick:x[0]||(x[0]=S=>!a.value&&d(-1*e.space))},null,8,["disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"headerScroll",ref:l,class:"stack-tab__scroll",onWheelPassive:w},[o.createElementVNode("div",{ref_key:"container",ref:n,class:o.normalizeClass(["stack-tab__scroll-container",{"stack-tab__shadow-inset-left":!a.value&&f.value,"stack-tab__shadow-inset-right":!f.value&&a.value,"stack-tab__shadow-inset-all":!a.value&&!f.value}]),onScrollPassive:y},[o.renderSlot(u.$slots,"default")],34),o.withDirectives(o.createElementVNode("div",{ref_key:"bar",ref:s,class:o.normalizeClass(["stack-tab__scrollbar",{"is-dragging":i.value}])},[o.createElementVNode("div",{ref_key:"thumb",ref:r,class:o.normalizeClass(["stack-tab__scrollbar-thumb",{"is-dragging":i.value}]),style:o.normalizeStyle({width:`${M.value}px`,transform:`translateX(${A.value}px)`}),onMousedown:o.withModifiers(g,["prevent"])},null,38)],2),[[o.vShow,O.value]])],544),c.value?(o.openBlock(),o.createBlock(Ve,{key:1,"icon-class":"stack-tab__icon-right-arrow",disabled:f.value,onClick:x[1]||(x[1]=S=>!f.value&&d(e.space))},null,8,["disabled"])):o.createCommentVNode("",!0)],64))}}),No={class:"stack-tab__header"},zo=o.defineComponent({__name:"index",props:{space:{},tabScrollMode:{default:Y.BOTH},tabTransition:{default:()=>({name:"stack-tab-zoom"})},contextmenu:{type:[Boolean,Object],default:!0},max:{default:20}},emits:["active"],setup(e,{emit:t}){const{t:n}=he(),s=o.inject("maximum"),r=t,i=o.ref(),{shown:a,contextMenuData:f,showContextMenu:c}=io(),l=()=>{a.value=!1},m=e,{closeTab:h,activeTab:b,tabs:I}=Be(),O=o.computed(()=>typeof m.tabTransition=="string"?{name:m.tabTransition}:m.tabTransition),M=o.computed(()=>m.tabScrollMode===Y.BOTH||m.tabScrollMode===Y.BUTTON),A=m.tabScrollMode===Y.BOTH||m.tabScrollMode===Y.WHEEL,y=_=>{_.closable&&h(_.id),a.value=!1},E=(_,p,k)=>{i.value&&p&&o.nextTick(()=>{i.value.isInView(p)||i.value.scrollIntoView(p)}),b(_.id,k),r("active",_.id)};return(_,p)=>(o.openBlock(),o.createElementBlock("div",No,[o.renderSlot(_.$slots,"leftButton"),o.createVNode(Lo,{ref_key:"scrollContainerRef",ref:i,space:e.space,"is-scroll-wheel":o.unref(A),"is-scroll-button":M.value},{default:o.withCtx(()=>[o.createVNode(o.TransitionGroup,o.mergeProps({key:"tab-list-transition",tag:"ul",class:"stack-tab__nav"},O.value,{appear:""}),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(I),(k,d)=>(o.openBlock(),o.createBlock(fo,{key:k.id,contextmenu:e.contextmenu,item:k,onContextmenu:o.withModifiers(w=>o.unref(c)(w,k,d,o.unref(I).length),["prevent"]),onMouseup:o.withModifiers(w=>y(k),["middle","prevent"]),onClose:y,onActive:E},null,8,["contextmenu","item","onContextmenu","onMouseup"]))),128))]),_:1},16)]),_:1},8,["space","is-scroll-wheel","is-scroll-button"]),o.renderSlot(_.$slots,"rightButton"),o.createVNode(Ve,{"icon-class":o.unref(s)?"stack-tab__icon-restore":"stack-tab__icon-fullscreen",title:o.unref(n)("VueStackTab.maximum"),onClick:p[0]||(p[0]=k=>s.value=!o.unref(s))},null,8,["icon-class","title"]),o.createVNode(o.Transition,{name:"stack-tab-zoom",appear:""},{default:o.withCtx(()=>[o.unref(a)?(o.openBlock(),o.createBlock(ro,{key:"context-menu-transition",left:o.unref(f).left,top:o.unref(f).top,"tab-item":o.unref(f).item,max:o.unref(f).max,index:o.unref(f).index,onClose:l},null,8,["left","top","tab-item","max","index"])):o.createCommentVNode("",!0)]),_:1})]))}}),Vo={class:"stack-tab__container"},Do={class:"stack-tab__iframe-wrapper"},Po={class:"stack-tab__iframe-loading"},$o={class:"stack-tab__iframe-loading-text"},Wo=["src","onLoad"],Uo=5e3,Yt=o.defineComponent({__name:"StackTabs",props:{defaultTabs:{default:()=>[]},max:{default:20},contextmenu:{type:[Boolean,Object],default:!0},pageTransition:{default:"stack-tab-swap"},pageTransitionBack:{default:"stack-tab-swap-back"},tabTransition:{default:"stack-tab-zoom"},tabScrollMode:{default:Y.BOTH},width:{default:"100%"},height:{default:"100%"},i18n:{default:"zh-CN"},space:{default:300},globalScroll:{type:Boolean,default:!1},iframePath:{},sessionPrefix:{default:""},iframeAllowedOrigins:{default:()=>[]}},emits:["onActive","onPageLoaded"],setup(e,{emit:t}){const{tabs:n,caches:s,refreshKey:r,excludedCacheIdsForRefresh:i,iframeRefreshKeys:a,destroy:f,addPage:c,initialize:l,setMaxSize:m,setGlobalScroll:h,setSessionPrefix:b}=Ce(),I=t,O=e,{changeLocale:M,t:A}=he(),y=o.ref(!1);o.provide("maximum",y);const{setIFramePath:E,openTab:_}=Be();E(O.iframePath),h(O.globalScroll),M(O.i18n);const p=(C,R)=>c(C,R),k=C=>{I("onActive",C)};m(O.max);const d=()=>{I("onPageLoaded")},w=o.ref(O.pageTransition),g=re(),V=()=>{w.value=O.pageTransition},$=()=>{w.value=O.pageTransitionBack};g.on("FORWARD",V),g.on("BACKWARD",$);const T=o.computed(()=>n.value.filter(C=>C.iframe)),v=o.reactive({}),u=o.computed(()=>T.value.filter(C=>C.active&&(C.url??"")&&!lt(C.url??"")));o.watch(u,C=>{for(const R of C)v[R.id]=!0},{immediate:!0,deep:!0});const x=C=>{const R=C.url??"";return lt(R)?"about:blank":v[C.id]?R:"about:blank"},S=C=>C.iframeRefreshMode==="reload"?`${C.id}-${a.value[C.id]??0}`:C.id,B=o.reactive({}),L=o.reactive({}),W=new Map,De=C=>{const R=W.get(C);R&&(clearTimeout(R),W.delete(C)),B[C]=!0,L[C]=!1},ot=C=>{if(B[C])return;L[C]=!0;const R=W.get(C);R&&clearTimeout(R),W.set(C,setTimeout(()=>{W.delete(C),L[C]=!1},Uo))};o.watch(u,C=>{for(const R of C)ot(R.id)},{immediate:!0,deep:!0});const ue=o.reactive({}),st=(C,R)=>{R?ue[C]=R:delete ue[C]},sn=C=>{const G=ue[C];if(G?.contentWindow)try{G.contentWindow.postMessage({type:"vue-stack-tabs:refresh"},"*")}catch{}},os=o.computed(()=>{const C=typeof window<"u"?window.location.origin:"",R=O.iframeAllowedOrigins??[];return[C,...R].filter(Boolean)}),rn=C=>{if(!os.value.includes(C.origin))return;const R=C.data;if(!R||typeof R!="object"||R.type!=="vue-stack-tabs:openTab")return;const G=R.payload;G&&typeof G=="object"&&G.title&&G.path&&_(G)};return g.on("REFRESH_IFRAME_POSTMESSAGE",sn),o.onBeforeMount(()=>{b(O.sessionPrefix),l(O.defaultTabs),window.addEventListener("message",rn)}),o.onBeforeUnmount(()=>{window.removeEventListener("message",rn),g.off("REFRESH_IFRAME_POSTMESSAGE",sn),g.off("FORWARD",V),g.off("BACKWARD",$),f()}),(C,R)=>{const G=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["stack-tab",{"stack-tab__maximum":y.value}]),style:o.normalizeStyle({width:e.width,height:e.height,"z-index":y.value?o.unref(Pe)("body *:not(.stack-tab,.stack-tab *)"):void 0})},[o.createVNode(zo,{space:e.space,"tab-transition":e.tabTransition,max:e.max,onActive:k},{leftButton:o.withCtx(()=>[o.renderSlot(C.$slots,"leftButton")]),rightButton:o.withCtx(()=>[o.renderSlot(C.$slots,"rightButton")]),_:3},8,["space","tab-transition","max"]),o.createElementVNode("div",Vo,[o.createVNode(G,null,{default:o.withCtx(({Component:oe,route:we})=>[o.createVNode(o.Transition,{name:w.value,appear:"",mode:"out-in"},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.KeepAlive,{include:o.unref(s),exclude:o.unref(i)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p(we,oe)),{key:`${we.fullPath}_${o.unref(r)}`,onOnLoaded:d},null,32))],1032,["include","exclude"]))]),_:2},1032,["name"])]),_:1}),o.createVNode(o.TransitionGroup,{name:e.pageTransition,tag:"div",class:"stack-tab__iframes",appear:""},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,oe=>(o.openBlock(),o.createBlock(o.Transition,{key:S(oe),name:e.pageTransition,appear:""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",Do,[o.withDirectives(o.createElementVNode("div",Po,[o.createElementVNode("span",$o,o.toDisplayString(o.unref(A)("VueStackTab.loading")),1)],512),[[o.vShow,L[oe.id]!==!1]]),o.createElementVNode("iframe",{ref_for:!0,ref:we=>st(oe.id,we),class:"stack-tab__iframe",src:x(oe),frameborder:"0",onLoad:we=>De(oe.id)},null,40,Wo)],512),[[o.vShow,oe.active]])]),_:2},1032,["name"]))),128))]),_:1},8,["name"])])],6)}}}),nt=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const Jt=typeof TextEncoder=="function"?new TextEncoder:void 0,Te=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(e=>{let t={};return e.forEach((n,s)=>t[n]=s),t})(Te);const H=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const Fo=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Qt=typeof btoa=="function"?e=>btoa(e):nt?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,s,r,i="";const a=e.length%3;for(let f=0;f<e.length;){if((n=e.charCodeAt(f++))>255||(s=e.charCodeAt(f++))>255||(r=e.charCodeAt(f++))>255)throw new TypeError("invalid character found");t=n<<16|s<<8|r,i+=Te[t>>18&63]+Te[t>>12&63]+Te[t>>6&63]+Te[t&63]}return a?i.slice(0,a-3)+"===".substring(a):i},Ho=nt?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let s=0,r=e.length;s<r;s+=4096)n.push(H.apply(null,e.subarray(s,s+4096)));return Qt(n.join(""))},Go=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?H(192|t>>>6)+H(128|t&63):H(224|t>>>12&15)+H(128|t>>>6&63)+H(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return H(240|t>>>18&7)+H(128|t>>>12&63)+H(128|t>>>6&63)+H(128|t&63)}},qo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,jo=e=>e.replace(qo,Go),en=nt?e=>Buffer.from(e,"utf8").toString("base64"):Jt?e=>Ho(Jt.encode(e)):e=>Qt(jo(e)),Zo=(e,t=!1)=>t?Fo(en(e)):en(e),Ko=e=>{const s=`<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1167.06 237.75"><path d="M79.24,19.73h108.91v29.7h-108.91v-29.7Z" style="fill:#79a7ff; stroke-width:0px;"/><path d="M179.24,199.67H20.26c-11.21-.07-20.26-9.17-20.26-20.38V20.39C0,9.18,9.05.07,20.26,0h59.49c3.51.07,6.34,2.9,6.41,6.42v44.36c0,3.54-2.87,6.41-6.41,6.41s-6.41-2.86-6.42-6.4V12.36H20.25c-4.13.07-7.44,3.44-7.44,7.56v159.41c0,4.13,3.31,7.49,7.44,7.56h158.98c4.13-.07,7.44-3.44,7.44-7.56V51.84c0-3.54,2.87-6.41,6.41-6.42,3.55,0,6.42,2.87,6.42,6.42v127.45c0,11.21-9.05,20.32-20.26,20.39h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M192.8,60.77c-3.66-.07-6.61-3.02-6.68-6.68v-18.23c.09-4.29-3.32-7.83-7.6-7.92h-96.43c-3.69,0-6.69-2.99-6.69-6.69s2.99-6.69,6.69-6.69h96.27c11.69.08,21.13,9.58,21.13,21.27v18.25c0,3.69-2.99,6.68-6.68,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M193.08,58.67H10.15c-3.61-.08-6.48-3.07-6.41-6.68-.08-3.62,2.79-6.61,6.4-6.69,0,0,0,0,0,0h182.93c3.62.08,6.48,3.08,6.41,6.69.07,3.61-2.79,6.6-6.41,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M137.2,58.67c-3.42.24-6.4-2.32-6.68-5.74v-28.15c.55-3.69,4-6.24,7.69-5.69,2.94.44,5.24,2.75,5.69,5.69v28.15c-.28,3.42-3.26,5.98-6.68,5.74h-.02Z" style="fill:#377dff; stroke-width:0px;"/><path d="M99.78,100.48l-12.83-22.22h-18.39l31.22,54.05,31.22-54.05h-18.39l-12.83,22.22Z" style="fill:#00d797; stroke-width:0px;"/><path d="M135.28,78.26l-35.49,61.43-35.44-61.43h-20.11l55.55,96.2,55.55-96.2s-20.06,0-20.06,0ZM313.33,59.95c0,.52-.67,1.84-2,3.95s-3.3,5.2-5.9,9.28-5.75,9.28-9.46,15.61c-3.7,6.33-7.52,13.34-11.45,21.04-4.51,8.85-7.76,15.8-9.76,20.86s-2.99,9.41-2.99,13.05c0,2.89,1.53,5.44,4.6,7.63,3.7-2.89,7.34-6.33,10.93-10.32,3.58-3.99,7.13-8.44,10.63-13.36s7.55-11.13,12.14-18.65c4.6-7.52,8.69-14.43,12.27-20.73-.17-.52-.36-1.04-.56-1.56s-.3-.95-.3-1.3c0-2.72.55-5.26,1.65-7.63,1.1-2.37,2.47-4.68,4.12-6.94s4.12-5.44,7.42-9.54c.87-1.1,1.94-1.65,3.21-1.65,2.08,0,3.12,1.33,3.12,3.99s-1.08,6.84-3.25,12.53c-2.17,5.7-5.37,12.39-9.59,20.08s-9.47,16.29-15.74,25.81c-6.28,9.51-13.37,19.45-21.3,29.8-8.04,10.47-13.79,15.7-17.26,15.7-1.97,0-4.19-1.08-6.68-3.25s-4.63-5.13-6.42-8.89-2.69-7.78-2.69-12.06c0-2.54.53-5.81,1.6-9.8s2.75-8.78,5.03-14.36,4.87-11.09,7.76-16.53c3.01-5.72,5.65-10.47,7.94-14.23,2.28-3.76,4.87-7.94,7.76-12.53,2.89-4.6,4.34-7.1,4.34-7.5,0-.87-.58-1.3-1.73-1.3-3.35,0-7.82,1.71-13.4,5.12s-12.85,8.59-21.82,15.53c-3.41,2.66-5.57,4.38-6.46,5.16s-1.34,1.43-1.34,1.95c0,.69.55,1.04,1.65,1.04.46,0,2.02-.17,4.68-.52s4.77-.52,6.33-.52c2.6,0,3.9.46,3.9,1.39,0,.81-.54,1.45-1.61,1.91-1.07.46-2.54.93-4.42,1.39s-4.44,1.1-7.68,1.91c-3.47.93-7.16,2.25-11.06,3.99-3.9,1.73-6.14,2.6-6.72,2.6-1.1,0-1.78-.4-2.04-1.21s-.39-2.14-.39-3.99c0-8.21,1.36-14.56,4.08-19.04s7.58-9.15,14.57-14.01c7.98-5.55,15.61-10.16,22.9-13.84,7.29-3.67,13.58-6.36,18.87-8.07s9.18-2.56,11.67-2.56,4.84,1.56,7.24,4.68,3.6,6.42,3.6,9.89h0ZM366.34,124.75c-8.39,11.1-14.76,19-19.13,23.68s-7.94,7.03-10.71,7.03c-2.2,0-4.22-.91-6.07-2.73-1.85-1.82-3.28-4.28-4.29-7.37s-1.52-6.4-1.52-9.93c0-2.31.22-4.39.65-6.25.43-1.85,1.26-3.89,2.47-6.12s2.82-4.64,4.81-7.24c2-2.6,4.44-5.55,7.33-8.85,1.73-2.02,3.19-3.73,4.38-5.12,1.18-1.39,2.34-2.33,3.47-2.82s2.96-.74,5.51-.74c1.85,0,3.61.25,5.29.74,1.68.49,2.52,1,2.52,1.52,0,1.04-.85,2.92-2.56,5.64s-4.45,6.03-8.24,9.93c-3.79,3.9-8.17,7.74-13.14,11.49-1.1,3.41-1.65,6.01-1.65,7.81,0,2.49.95,3.73,2.86,3.73.69,0,1.85-.59,3.47-1.78,1.62-1.18,4.35-3.47,8.2-6.85,3.84-3.38,7.3-6.38,10.37-8.98,2.25-1.97,4.87-4.9,7.85-8.8s5.39-6.84,7.24-8.8c4.28-4.51,7.2-7.44,8.76-8.8s3.06-2.04,4.51-2.04,2.33.43,2.82,1.3c.49.87.74,2.63.74,5.29,0,1.21-.12,2.2-.35,2.95s-.71,1.72-1.43,2.91-2.18,3.37-4.38,6.55-4.8,6.94-7.81,11.28c-1.66,2.38-3.09,4.93-4.25,7.59-1.21,2.75-1.82,4.81-1.82,6.2,0,3.01,1.18,4.51,3.56,4.51,1.96,0,4.25-.81,6.85-2.43s6.59-4.54,11.97-8.76v5.81c-6.77,6.25-11.77,10.79-15.01,13.62s-6.04,4.97-8.41,6.42-4.63,2.17-6.77,2.17c-4.86,0-7.29-2.89-7.29-8.67,0-2.2.72-5.16,2.17-8.89,1.44-3.73,3.79-9.12,7.03-16.18v-.02Z" style="fill:#306fff; stroke-width:0px;"/><path d="M407.71,133.77v2.17c0,3.41.84,6.07,2.52,7.98,1.68,1.91,3.87,2.86,6.59,2.86s5.77-.66,8.8-2c3.04-1.33,6.06-3.09,9.07-5.29s6.68-5.15,11.02-8.85v5.29c-6.54,7.87-12.67,13.89-18.39,18.09-5.72,4.19-11.54,6.29-17.44,6.29-5.15,0-9.22-2-12.23-5.99s-4.51-9.46-4.51-16.39c0-6.07,1.42-11.58,4.25-16.52s7.46-10.16,13.88-15.66c4.39-3.76,8.76-6.59,13.1-8.5s8.21-2.86,11.62-2.86c2.72,0,4.87.62,6.46,1.86s2.39,3.11,2.39,5.59c0,3.64-1.36,7.27-4.08,10.89s-6.87,7.2-12.45,10.76c-5.58,3.56-12.45,6.98-20.6,10.28h0ZM408.58,128.13c5.2-2.02,9.66-4.54,13.36-7.55,3.7-3.01,6.43-5.88,8.2-8.63,1.76-2.75,2.65-4.76,2.65-6.03s-.61-2-1.82-2c-1.04,0-2.73.67-5.07,2s-4.71,3.07-7.11,5.21-4.55,4.66-6.46,7.55c-1.9,2.86-3.17,6.08-3.73,9.46h-.02ZM585.37,132.9c-1.45-2.66-3.61-5.06-6.51-7.2-2.89-2.14-6.15-3.86-9.76-5.16s-7.39-2.27-11.32-2.91c-11.68-1.74-22.58-5.52-32.7-11.36-.87-.46-1.79-1.44-2.78-2.95-.98-1.5-1.47-2.95-1.47-4.34,0-5.09.85-10.19,2.56-15.31,1.71-5.12,3.89-9.12,6.55-12.01,4.28-4.8,11.98-8.99,23.12-12.58,11.13-3.58,23.67-5.38,37.6-5.38,8.33,0,14.76.64,19.3,1.91s6.81,3.24,6.81,5.9c0,4.34-.59,7.69-1.78,10.06s-2.46,3.95-3.82,4.73c-1.36.78-3.75,1.84-7.16,3.17-3.64,1.27-6.81,2.6-9.5,3.99s-4.99,2.72-6.9,3.99c-1.91,1.27-3.09,1.91-3.56,1.91-.58,0-.87-.23-.87-.69,0-.98,1.03-2.47,3.08-4.47s4.58-3.74,7.59-5.25c3.18-1.68,4.77-2.75,4.77-3.21,0-.75-1.76-1.13-5.29-1.13-10.7,0-20.59.95-29.67,2.86s-16.24,4.42-21.47,7.55c-5.23,3.12-7.85,6.3-7.85,9.54,0,2.02,1.08,3.46,3.25,4.29,2.17.84,6.95,2.24,14.36,4.21,7.4,1.97,14.02,4.22,19.86,6.77,8.38,3.59,14.6,7.32,18.65,11.19,4.05,3.88,6.07,8.21,6.07,13.01,0,3.3-.8,6.61-2.39,9.93-1.59,3.33-3.92,6.38-6.98,9.15-3.07,2.78-6.59,5.06-10.58,6.85-3.41,1.45-7.71,2.8-12.88,4.08-5.18,1.27-10.79,2.27-16.83,2.99-6.04.72-11.81,1.08-17.31,1.08-10.12,0-18.26-.95-24.42-2.86s-9.24-4.8-9.24-8.67c0-1.74,1.04-4.44,3.12-8.11s4.54-6.14,7.37-7.42c2.49-.98,4.89-1.55,7.2-1.69,2.31-.14,3.47.13,3.47.82,0,.17-.09.35-.26.52s-.38.32-.61.43c-.23.12-.46.23-.69.35-1.16.46-2.1.82-2.82,1.08-.72.26-1.3.52-1.74.78-.43.26-.65.62-.65,1.08,0,1.21,5.99,1.82,17.96,1.82,10.41,0,18.94-.38,25.59-1.13s12.52-2.11,17.61-4.08c5.09-1.97,9.71-4.68,13.88-8.15l.04.02ZM640.8,85.63h3.73c3.06-5.49,5.84-9.38,8.33-11.67,2.49-2.28,5.32-3.43,8.5-3.43s4.77.72,4.77,2.17c0,.69-1.24,2.57-3.73,5.64s-4.37,5.64-5.64,7.72c1.96.23,3.71.43,5.25.61,1.53.17,2.73.32,3.6.43-3.3,6.13-7.43,12.4-12.4,18.82l-4.08-.3c-1.1-.09-2.21-.17-3.34-.26s-2.5-.19-4.12-.3c-3.12,5.03-5.74,9.53-7.85,13.49s-3.73,7.59-4.86,10.89-1.69,6.42-1.69,9.37c0,3.99,1.59,5.99,4.77,5.99,2.2,0,5.07-1.17,8.63-3.51s8.31-5.94,14.27-10.8v5.81c-15.61,16.95-27.15,25.42-34.61,25.42-2.6,0-4.7-1.01-6.29-3.04-1.59-2.02-2.38-4.63-2.38-7.81,0-2.14.45-4.68,1.34-7.63.9-2.95,2.5-7.4,4.81-13.36-.81.69-1.58,1.37-2.3,2.04s-1.39,1.27-2,1.82-1.26,1.13-1.95,1.73c-.69.61-1.39,1.23-2.08,1.87v-5.99c6.07-5.09,13.42-14.02,22.03-26.8-.87-.06-1.68-.1-2.43-.13s-1.65-.04-2.69-.04c-3.41,0-5.96.23-7.63.69-.69.17-1.34.36-1.95.56s-1.03.3-1.26.3-.35-.17-.35-.52c0-1.91,1.18-4.77,3.56-8.59,1.91-3.24,3.72-5.64,5.42-7.2,1.71-1.56,3.79-2.62,6.25-3.17,2.46-.55,5.91-.82,10.37-.82h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M664.91,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM706.46,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M779.07,130.82v5.81c-6.19,6.07-11.23,10.79-15.14,14.14-3.9,3.35-7.55,5.96-10.93,7.81-3.38,1.85-6.69,2.78-9.93,2.78s-6.1-1.26-8.76-3.77c-2.66-2.52-4.74-5.81-6.25-9.89-1.5-4.08-2.26-8.4-2.26-12.97,0-3.93.87-7.43,2.6-10.5,1.74-3.07,5.09-7.03,10.06-11.88,5.9-5.78,11.38-10.25,16.44-13.4s9.04-4.73,11.93-4.73c2.08,0,3.85.72,5.29,2.17s2.17,3.27,2.17,5.46c0,1.85-.95,4.48-2.86,7.89-1.91,3.41-4.05,6.38-6.42,8.89-2.37,2.52-4.25,3.77-5.64,3.77-1.5,0-2.25-.81-2.25-2.43.06-.46.1-.9.13-1.3s.04-.81.04-1.21c0-.69-.25-1.08-.74-1.17s-1.08.13-1.78.65c-5.78,4.05-9.75,6.9-11.88,8.54-2.14,1.65-3.83,3.31-5.07,4.99s-1.87,3.44-1.87,5.29c0,3.41,1.1,6.19,3.3,8.33s5.06,3.21,8.59,3.21,8.02-1.4,13.14-4.21c5.12-2.8,11.15-6.9,18.09-12.27h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M844.13,130.65v5.81c-6.48,7.58-11.91,13.32-16.31,17.22s-8.07,5.86-11.02,5.86-5.39-.84-7.68-2.52c-2.29-1.68-4.34-3.99-6.16-6.94-1.82-2.95-3.98-7.05-6.46-12.32-2.95,3.64-5.61,7.04-7.98,10.19-2.37,3.15-4.02,5.25-4.94,6.29-.93,1.04-1.77,1.56-2.52,1.56-1.56,0-2.69-1-3.38-2.99-.69-2-1.04-4.9-1.04-8.72,0-5.21.62-10.22,1.87-15.05,1.24-4.83,3.04-9.53,5.38-14.1s5.35-9.5,9.02-14.79c3.67-5.29,7.79-10.83,12.36-16.61,6.3-7.98,11.74-14.5,16.31-19.56,4.57-5.06,8.54-8.88,11.93-11.45,3.38-2.57,6.2-3.86,8.46-3.86,2.78,0,4.16,1.24,4.16,3.73,0,2.14-5.12,9.85-15.35,23.12-10.24,13.27-25.16,31.39-44.76,54.35v7.46c13.13-14.05,23.69-24.49,31.71-31.31,8.01-6.82,14.21-10.24,18.61-10.24,1.79,0,3.18,1.06,4.16,3.17s1.47,4.55,1.47,7.33c0,5.67-2.43,10.92-7.29,15.74-4.86,4.83-12.32,10.37-22.38,16.61,1.74,2.6,3.27,4.5,4.6,5.68,1.33,1.19,3.01,1.78,5.03,1.78,1.79,0,3.73-.61,5.81-1.82s4.21-2.75,6.38-4.6,5.51-4.86,10.02-9.02h-.01ZM809.86,135.07c2.2-1.45,4.93-3.69,8.2-6.72,3.27-3.04,6.06-6.19,8.37-9.46s3.47-6,3.47-8.2c0-.92-.41-1.39-1.21-1.39-2.2,0-5.97,2.11-11.32,6.33-5.35,4.22-10.57,9.63-15.66,16.22,2.2,0,4.92,1.07,8.15,3.21h0ZM951.78,140.71l2.86,2.17c-.75,1.62-1.47,3.04-2.17,4.25-.69,1.21-1.53,2.69-2.52,4.42-.98,1.73-1.73,3.04-2.25,3.9-4.34,7.58-8.41,11.36-12.23,11.36-1.62,0-3.01-.64-4.16-1.91-1.16-1.27-1.73-3.01-1.73-5.2,0-3.12,1.11-7.4,3.34-12.84,2.23-5.43,5.67-12.13,10.32-20.08s10.51-16.96,17.57-27.02c7.05-10.06,15.01-20.67,23.85-31.84-5.09-.75-11.13-1.13-18.13-1.13-8.04,0-16.99.9-26.85,2.69s-18.45,3.86-25.76,6.2c-7.32,2.34-10.97,4.06-10.97,5.16,0,.41.14.68.43.82.29.15.77.26,1.43.35s1.52.19,2.56.3c6.77.93,10.15,1.97,10.15,3.12,0,.58-1.47.85-4.42.82s-6.51-.04-10.67-.04c-3.3,0-5.68-.13-7.16-.39s-2.46-.75-2.95-1.47-.74-1.84-.74-3.34c0-.98.29-3.12.87-6.42,1.1-6.13,2.79-11.04,5.07-14.75,2.28-3.7,5.78-6.72,10.5-9.06,4.71-2.34,11.2-4.21,19.47-5.59,13.88-2.37,25.36-3.56,34.44-3.56,6.71,0,12,.27,15.88.82,3.87.55,6.72,1.34,8.54,2.39,1.82,1.04,2.98,2.07,3.47,3.08s1.14,2.76,1.95,5.25l2.69,7.98c.17.52.32.94.43,1.26.12.32.22.65.3,1,.09.35.13.67.13.95,0,2.26-.51,4.28-1.52,6.07s-2.86,4.48-5.55,8.07-4.67,6.39-5.94,8.41c-14.92,24.23-25.1,42.16-30.53,53.78v.02ZM991.94,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM1033.49,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1111.3,130.82v5.64c-6.02,3.82-10.76,5.72-14.23,5.72-1.91,0-3.93-.32-6.07-.95-5.2,6.59-9.67,11.42-13.4,14.49s-7.47,4.6-11.23,4.6c-4.34,0-7.68-2.29-10.02-6.85-2.34-4.57-3.51-10.24-3.51-17,0-9.2,2.78-19.21,8.33-30.06,5.56-10.85,12.29-21.07,20.08-30.45,7.84-9.46,15.43-17.28,22.77-23.46,7.34-6.19,12.32-9.28,14.92-9.28s3.73,1.71,3.73,5.12c0,15.15-19.43,41.58-58.29,79.29-.12,1.04-.17,3.09-.17,6.16,0,7.98,2.14,11.97,6.42,11.97,1.68,0,3.37-.68,5.07-2.04,1.71-1.36,4.32-3.95,7.85-7.76-1.39-3.12-2.08-5.44-2.08-6.94,0-3.18,1.3-6.62,3.9-10.32s5.57-6.9,8.89-9.59c3.33-2.69,5.74-4.03,7.24-4.03,2.37,0,3.56,1.71,3.56,5.12,0,2.6-.68,5.72-2.04,9.37-1.36,3.64-3.34,7.81-5.94,12.49.98.81,1.76,1.4,2.34,1.78s1.45.56,2.6.56c2.66,0,5.75-1.18,9.28-3.56v-.02ZM1067.24,117.81c3.01-2.6,6.03-5.68,9.06-9.24s7.47-9.01,13.32-16.35c5.61-7.05,10.02-12.94,13.23-17.65s5.62-8.63,7.24-11.75c1.62-3.12,2.43-5.26,2.43-6.42,0-.87-.23-1.3-.69-1.3-1.27,0-3.92,2.1-7.94,6.29-4.02,4.19-8.6,9.93-13.75,17.22-7.11,10.06-12.26,17.64-15.44,22.73-3.18,5.09-5.67,10.58-7.46,16.48h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1110.96,133.08v-2.08c14.92-15.73,25.18-26.75,30.79-33.05,1.27-7.11,4.34-10.67,9.19-10.67,1.21,0,2.52.35,3.9,1.04l.52,1.65c-.23.69-.35,1.68-.35,2.95,0,1.1.42,3.14,1.26,6.12s1.49,5.48,1.95,7.5.69,4.31.69,6.85c0,3.82-.87,7.48-2.6,10.97-1.73,3.5-4.25,6.85-7.55,10.06-3.3,3.21-7.55,6.49-12.75,9.85,2.08.35,3.73.52,4.94.52,2.37,0,4.93-.59,7.68-1.78,2.75-1.18,5.55-2.78,8.41-4.77,2.86-2,6.2-4.58,10.02-7.76v5.81c-7.4,7.23-14.02,12.71-19.86,16.44s-10.87,5.59-15.09,5.59c-5.44,0-10.47-2.31-15.09-6.94-2.72-2.78-4.41-5.43-5.08-7.98-.67-2.54-1-5.99-1-10.32h.02ZM1143.31,119.8l-1.56-12.66c-3.59,4.05-11.25,11.83-22.99,23.33,3.47.75,5.84,1.76,7.11,3.04,1.27,1.27,3.06,3.73,5.38,7.37,3.93-1.62,6.95-3.83,9.07-6.64,2.11-2.8,3.17-6.64,3.17-11.49,0-.58-.01-1.1-.04-1.56s-.07-.92-.13-1.39h0Z" style="fill:#306fff; stroke-width:0px;"/><g style="isolation:isolate;"><text transform="translate(943.45 229.96)" style="fill:#00d797; font-family:ArialMT, Arial; font-size:24px; isolation:isolate;"><tspan x="0" y="0">version: ${e}</tspan></text></g></svg>`,a="data:image/svg+xml;base64,"+Zo(s),f="font-size: 1px; padding: "+Math.floor(100/4)+"px "+Math.floor(580/2)+"px; line-height: "+Math.floor(100/2)+"px;";window.console.log("%c+",f+`background-image: url(${a});background-size: 580px 100px;background-repeat: norepeat; color: transparent;`)},Xo="FORWARD",Yo="BACKWARD";function tn(){const e=o.getCurrentInstance(),{attrs:t,props:n}=e,s=t.tId??n.tId,r=t.pId??n.pId,i=ke.useRoute(),a=ke.useRouter(),f=re(),{getTab:c,markCacheForEviction:l,getComponent:m,addPageScroller:h}=Ce(),b=i.query.__tab;return{forward:A=>{const y=q({__tab:b},A.query);f.emit(Xo),a.push({path:A.path,query:y})},backward:(A,y)=>{const E=c(s);if(!E)return;const _=E.pages;let p=0;if(typeof A=="number")p=Math.abs(A);else{const w=$e(A);y=q(w.query,y);const g=_.list();let V=!1;for(let $=_.size()-2;$>=0;$--)if(p++,g[$]?.path===w.path){V=!0;break}if(!V)return}if(p<=0||_.size()<=p)return;for(let w=0;w<p;w++){const g=_.pop();g&&l(g.id)}const k=_.peek();if(!k)return;const d=m(k.id);if(d&&y){const g=d.components?.DynamicComponent;g?.props&&(g.props=q(y,g.props))}f.emit(Yo),a.push({path:k.path,query:k.query})},addScrollTarget:(...A)=>{h(r,...A)}}}const Jo=o.defineComponent({__name:"iframe",setup(e){return tn(),()=>{}}}),Qo=()=>{const e=re(),{attrs:t}=o.getCurrentInstance();o.onUnmounted(()=>{s()});const n=()=>{e.emit(P.PAGE_LOADING,{tId:t.tId,value:!0})},s=()=>{e.emit(P.PAGE_LOADING,{tId:t.tId,value:!1})};return{openTabLoading:n,closeTabLoading:s}},nn="vue-stack-tabs:refresh",on="vue-stack-tabs:openTab";function es(e){typeof window>"u"||!window.parent||window.parent.postMessage({type:on,payload:e},"*")}function ts(e=()=>window.location.reload()){if(typeof window>"u")return()=>{};const t=n=>{n.data?.type===nn&&e()};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}const ns={install(e,t){Ko("1.0.0"),e.component("VueStackTabs",Yt).use(Hn).use(yn().getI18n(t))}};N.IFrame=Jo,N.MSG_OPEN_TAB=on,N.MSG_REFRESH=nn,N.Stack=xe,N.StackTab=Yt,N.TabHeaderButton=Ve,N.TabScrollMode=Y,N.default=ns,N.onRefreshRequest=ts,N.postOpenTab=es,N.useTabActions=Be,N.useTabLoading=Qo,N.useTabRouter=tn,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach } from 'vitest'
|
|
2
|
-
import {
|
|
3
|
-
markCacheForEviction,
|
|
4
|
-
markTabPagesForEviction,
|
|
5
|
-
markTabPagesForEvictionOnly,
|
|
6
|
-
addCache,
|
|
7
|
-
removeCache,
|
|
8
|
-
evictPageCache,
|
|
9
|
-
evictMarkedCaches
|
|
10
|
-
} from './evict'
|
|
11
|
-
import { caches, cacheIdsToEvict, tabIdsToEvict, components } from './state'
|
|
12
|
-
import { Stack } from '../../model/TabModel'
|
|
13
|
-
import type { ITabPage } from '../../model/TabModel'
|
|
14
|
-
|
|
15
|
-
function resetState() {
|
|
16
|
-
caches.value = []
|
|
17
|
-
cacheIdsToEvict.clear()
|
|
18
|
-
tabIdsToEvict.clear()
|
|
19
|
-
components.clear()
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
beforeEach(resetState)
|
|
23
|
-
|
|
24
|
-
describe('evict', () => {
|
|
25
|
-
it('addCache 添加缓存 id', () => {
|
|
26
|
-
addCache('c1')
|
|
27
|
-
expect(caches.value).toContain('c1')
|
|
28
|
-
addCache('c1')
|
|
29
|
-
expect(caches.value.filter((x) => x === 'c1')).toHaveLength(1)
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
it('removeCache 移除指定 id', () => {
|
|
33
|
-
addCache('c1')
|
|
34
|
-
removeCache('c1')
|
|
35
|
-
expect(caches.value).not.toContain('c1')
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
it('markCacheForEviction 标记待驱逐', () => {
|
|
39
|
-
markCacheForEviction('c1')
|
|
40
|
-
expect(cacheIdsToEvict.has('c1')).toBe(true)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
it('markTabPagesForEviction 标记标签下所有页面并加入 tabIdsToEvict', () => {
|
|
44
|
-
const page: ITabPage = { id: 'p1', tabId: 't1', path: '/x' }
|
|
45
|
-
const stack = new Stack<ITabPage>()
|
|
46
|
-
stack.push(page)
|
|
47
|
-
const tab = { id: 't1', pages: { list: () => stack.list() } }
|
|
48
|
-
markTabPagesForEviction(tab)
|
|
49
|
-
expect(cacheIdsToEvict.has('p1')).toBe(true)
|
|
50
|
-
expect(tabIdsToEvict.has('t1')).toBe(true)
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
it('markTabPagesForEvictionOnly 只标记页面不标记 tab', () => {
|
|
54
|
-
const page: ITabPage = { id: 'p1', tabId: 't1', path: '/x' }
|
|
55
|
-
const stack = new Stack<ITabPage>()
|
|
56
|
-
stack.push(page)
|
|
57
|
-
const tab = { pages: { list: () => stack.list() } }
|
|
58
|
-
markTabPagesForEvictionOnly(tab)
|
|
59
|
-
expect(cacheIdsToEvict.has('p1')).toBe(true)
|
|
60
|
-
expect(tabIdsToEvict.size).toBe(0)
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
it('evictPageCache 立即驱逐单个缓存', () => {
|
|
64
|
-
addCache('c1')
|
|
65
|
-
components.set('c1', {} as never)
|
|
66
|
-
evictPageCache('c1')
|
|
67
|
-
expect(caches.value).not.toContain('c1')
|
|
68
|
-
expect(components.has('c1')).toBe(false)
|
|
69
|
-
expect(cacheIdsToEvict.has('c1')).toBe(false)
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
it('evictMarkedCaches 执行所有待驱逐', () => {
|
|
73
|
-
addCache('c1')
|
|
74
|
-
addCache('c2')
|
|
75
|
-
components.set('c1', {} as never)
|
|
76
|
-
components.set('c2', {} as never)
|
|
77
|
-
markCacheForEviction('c1')
|
|
78
|
-
markCacheForEviction('c2')
|
|
79
|
-
evictMarkedCaches()
|
|
80
|
-
expect(caches.value).not.toContain('c1')
|
|
81
|
-
expect(caches.value).not.toContain('c2')
|
|
82
|
-
expect(components.size).toBe(0)
|
|
83
|
-
expect(cacheIdsToEvict.size).toBe(0)
|
|
84
|
-
})
|
|
85
|
-
})
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest'
|
|
2
|
-
import { normalizePathForCache } from './useTabPanel'
|
|
3
|
-
import type { RouteLocationNormalizedLoaded } from 'vue-router'
|
|
4
|
-
|
|
5
|
-
function mockRoute(path: string, matchedPath?: string): RouteLocationNormalizedLoaded {
|
|
6
|
-
return {
|
|
7
|
-
path,
|
|
8
|
-
matched: [{ path: matchedPath ?? path }] as RouteLocationNormalizedLoaded['matched'],
|
|
9
|
-
query: {},
|
|
10
|
-
params: {},
|
|
11
|
-
hash: '',
|
|
12
|
-
fullPath: path,
|
|
13
|
-
name: undefined,
|
|
14
|
-
meta: {},
|
|
15
|
-
redirectedFrom: undefined
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
describe('normalizePathForCache', () => {
|
|
20
|
-
it('当 matched.path 无尾斜杠且 route.path 有尾斜杠时,返回规范化 path', () => {
|
|
21
|
-
const r = mockRoute('/dashboard/', '/dashboard')
|
|
22
|
-
expect(normalizePathForCache(r)).toBe('/dashboard')
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
it('路径与 matched 一致时返回规范化 path', () => {
|
|
26
|
-
const r = mockRoute('/home', '/home')
|
|
27
|
-
expect(normalizePathForCache(r)).toBe('/home')
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
it('路径与 matched 不一致时返回原 path', () => {
|
|
31
|
-
const r = mockRoute('/detail/1', '/detail/:id')
|
|
32
|
-
expect(normalizePathForCache(r)).toBe('/detail/1')
|
|
33
|
-
})
|
|
34
|
-
})
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest'
|
|
2
|
-
import { Stack } from './TabModel'
|
|
3
|
-
|
|
4
|
-
describe('Stack', () => {
|
|
5
|
-
it('push 与 peek', () => {
|
|
6
|
-
const s = new Stack<number>()
|
|
7
|
-
s.push(1)
|
|
8
|
-
expect(s.peek()).toBe(1)
|
|
9
|
-
s.push(2)
|
|
10
|
-
expect(s.peek()).toBe(2)
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
it('pop 返回栈顶并移除', () => {
|
|
14
|
-
const s = new Stack<string>(['a', 'b'])
|
|
15
|
-
expect(s.pop()).toBe('b')
|
|
16
|
-
expect(s.pop()).toBe('a')
|
|
17
|
-
expect(s.pop()).toBeUndefined()
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
it('size 与 isEmpty', () => {
|
|
21
|
-
const s = new Stack<number>()
|
|
22
|
-
expect(s.isEmpty()).toBe(true)
|
|
23
|
-
expect(s.size()).toBe(0)
|
|
24
|
-
s.push(1)
|
|
25
|
-
expect(s.isEmpty()).toBe(false)
|
|
26
|
-
expect(s.size()).toBe(1)
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
it('list 返回元素数组', () => {
|
|
30
|
-
const s = new Stack<number>([1, 2, 3])
|
|
31
|
-
expect(s.list()).toEqual([1, 2, 3])
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
it('clear 清空栈', () => {
|
|
35
|
-
const s = new Stack<number>([1, 2])
|
|
36
|
-
s.clear()
|
|
37
|
-
expect(s.isEmpty()).toBe(true)
|
|
38
|
-
expect(s.peek()).toBeUndefined()
|
|
39
|
-
})
|
|
40
|
-
})
|