@ghentcdh/authentication-vue 0.0.2-3 → 0.0.2-5
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/index.mjs +3131 -0
- package/lib/authentication.store.d.ts +19 -0
- package/lib/keycloak.adapter.d.ts +9 -0
- package/lib/request.store.d.ts +25 -0
- package/package.json +1 -1
- package/eslint.config.cjs +0 -21
- package/project.json +0 -13
- package/src/lib/authentication.store.ts +0 -46
- package/src/lib/keycloak.adapter.ts +0 -55
- package/src/lib/request.store.ts +0 -126
- package/src/lib/vue-shims.d.ts +0 -7
- package/tsconfig.json +0 -23
- package/tsconfig.lib.json +0 -31
- package/tsconfig.spec.json +0 -28
- package/vite.config.ts +0 -61
- /package/{src/index.ts → index.d.ts} +0 -0
package/index.mjs
ADDED
|
@@ -0,0 +1,3131 @@
|
|
|
1
|
+
function en(t) {
|
|
2
|
+
if (!(this instanceof en))
|
|
3
|
+
throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");
|
|
4
|
+
if (typeof t != "string" && !mt(t))
|
|
5
|
+
throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");
|
|
6
|
+
if (mt(t)) {
|
|
7
|
+
const s = "oidcProvider" in t ? ["clientId"] : ["url", "realm", "clientId"];
|
|
8
|
+
for (const l of s)
|
|
9
|
+
if (!t[l])
|
|
10
|
+
throw new Error(`The configuration object is missing the required '${l}' property.`);
|
|
11
|
+
}
|
|
12
|
+
var e = this, n, r = [], o, i = {
|
|
13
|
+
enable: !0,
|
|
14
|
+
callbackList: [],
|
|
15
|
+
interval: 5
|
|
16
|
+
};
|
|
17
|
+
e.didInitialize = !1;
|
|
18
|
+
var c = !0, a = $(console.info), p = $(console.warn);
|
|
19
|
+
globalThis.isSecureContext || p(
|
|
20
|
+
`[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available.
|
|
21
|
+
Continuing to run your application insecurely will lead to unexpected behavior and breakage.
|
|
22
|
+
|
|
23
|
+
For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`
|
|
24
|
+
), e.init = function(s = {}) {
|
|
25
|
+
if (e.didInitialize)
|
|
26
|
+
throw new Error("A 'Keycloak' instance can only be initialized once.");
|
|
27
|
+
e.didInitialize = !0, e.authenticated = !1, o = ye();
|
|
28
|
+
var l = ["default", "cordova", "cordova-native"];
|
|
29
|
+
if (l.indexOf(s.adapter) > -1 ? n = ie(s.adapter) : typeof s.adapter == "object" ? n = s.adapter : window.Cordova || window.cordova ? n = ie("cordova") : n = ie(), typeof s.useNonce < "u" && (c = s.useNonce), typeof s.checkLoginIframe < "u" && (i.enable = s.checkLoginIframe), s.checkLoginIframeInterval && (i.interval = s.checkLoginIframeInterval), s.onLoad === "login-required" && (e.loginRequired = !0), s.responseMode)
|
|
30
|
+
if (s.responseMode === "query" || s.responseMode === "fragment")
|
|
31
|
+
e.responseMode = s.responseMode;
|
|
32
|
+
else
|
|
33
|
+
throw "Invalid value for responseMode";
|
|
34
|
+
if (s.flow) {
|
|
35
|
+
switch (s.flow) {
|
|
36
|
+
case "standard":
|
|
37
|
+
e.responseType = "code";
|
|
38
|
+
break;
|
|
39
|
+
case "implicit":
|
|
40
|
+
e.responseType = "id_token token";
|
|
41
|
+
break;
|
|
42
|
+
case "hybrid":
|
|
43
|
+
e.responseType = "code id_token token";
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
throw "Invalid value for flow";
|
|
47
|
+
}
|
|
48
|
+
e.flow = s.flow;
|
|
49
|
+
}
|
|
50
|
+
if (s.timeSkew != null && (e.timeSkew = s.timeSkew), s.redirectUri && (e.redirectUri = s.redirectUri), s.silentCheckSsoRedirectUri && (e.silentCheckSsoRedirectUri = s.silentCheckSsoRedirectUri), typeof s.silentCheckSsoFallback == "boolean" ? e.silentCheckSsoFallback = s.silentCheckSsoFallback : e.silentCheckSsoFallback = !0, typeof s.pkceMethod < "u") {
|
|
51
|
+
if (s.pkceMethod !== "S256" && s.pkceMethod !== !1)
|
|
52
|
+
throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${s.pkceMethod}.`);
|
|
53
|
+
e.pkceMethod = s.pkceMethod;
|
|
54
|
+
} else
|
|
55
|
+
e.pkceMethod = "S256";
|
|
56
|
+
typeof s.enableLogging == "boolean" ? e.enableLogging = s.enableLogging : e.enableLogging = !1, s.logoutMethod === "POST" ? e.logoutMethod = "POST" : e.logoutMethod = "GET", typeof s.scope == "string" && (e.scope = s.scope), typeof s.acrValues == "string" && (e.acrValues = s.acrValues), typeof s.messageReceiveTimeout == "number" && s.messageReceiveTimeout > 0 ? e.messageReceiveTimeout = s.messageReceiveTimeout : e.messageReceiveTimeout = 1e4, e.responseMode || (e.responseMode = "fragment"), e.responseType || (e.responseType = "code", e.flow = "standard");
|
|
57
|
+
var m = A(), g = A();
|
|
58
|
+
g.promise.then(function() {
|
|
59
|
+
e.onReady && e.onReady(e.authenticated), m.setSuccess(e.authenticated);
|
|
60
|
+
}).catch(function(d) {
|
|
61
|
+
m.setError(d);
|
|
62
|
+
});
|
|
63
|
+
var h = de();
|
|
64
|
+
function v() {
|
|
65
|
+
var d = function(O) {
|
|
66
|
+
O || (I.prompt = "none"), s.locale && (I.locale = s.locale), e.login(I).then(function() {
|
|
67
|
+
g.setSuccess();
|
|
68
|
+
}).catch(function(U) {
|
|
69
|
+
g.setError(U);
|
|
70
|
+
});
|
|
71
|
+
}, w = async function() {
|
|
72
|
+
var O = document.createElement("iframe"), U = await e.createLoginUrl({ prompt: "none", redirectUri: e.silentCheckSsoRedirectUri });
|
|
73
|
+
O.setAttribute("src", U), O.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), O.setAttribute("title", "keycloak-silent-check-sso"), O.style.display = "none", document.body.appendChild(O);
|
|
74
|
+
var Y = function(ce) {
|
|
75
|
+
if (!(ce.origin !== window.location.origin || O.contentWindow !== ce.source)) {
|
|
76
|
+
var se = T(ce.data);
|
|
77
|
+
j(se, g), document.body.removeChild(O), window.removeEventListener("message", Y);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
window.addEventListener("message", Y);
|
|
81
|
+
}, I = {};
|
|
82
|
+
switch (s.onLoad) {
|
|
83
|
+
case "check-sso":
|
|
84
|
+
i.enable ? b().then(function() {
|
|
85
|
+
D().then(function(O) {
|
|
86
|
+
O ? g.setSuccess() : e.silentCheckSsoRedirectUri ? w() : d(!1);
|
|
87
|
+
}).catch(function(O) {
|
|
88
|
+
g.setError(O);
|
|
89
|
+
});
|
|
90
|
+
}) : e.silentCheckSsoRedirectUri ? w() : d(!1);
|
|
91
|
+
break;
|
|
92
|
+
case "login-required":
|
|
93
|
+
d(!0);
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
throw "Invalid value for onLoad";
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function f() {
|
|
100
|
+
var d = T(window.location.href);
|
|
101
|
+
if (d && window.history.replaceState(window.history.state, null, d.newUrl), d && d.valid)
|
|
102
|
+
return b().then(function() {
|
|
103
|
+
j(d, g);
|
|
104
|
+
}).catch(function(w) {
|
|
105
|
+
g.setError(w);
|
|
106
|
+
});
|
|
107
|
+
s.token && s.refreshToken ? (z(s.token, s.refreshToken, s.idToken), i.enable ? b().then(function() {
|
|
108
|
+
D().then(function(w) {
|
|
109
|
+
w ? (e.onAuthSuccess && e.onAuthSuccess(), g.setSuccess(), _()) : g.setSuccess();
|
|
110
|
+
}).catch(function(w) {
|
|
111
|
+
g.setError(w);
|
|
112
|
+
});
|
|
113
|
+
}) : e.updateToken(-1).then(function() {
|
|
114
|
+
e.onAuthSuccess && e.onAuthSuccess(), g.setSuccess();
|
|
115
|
+
}).catch(function(w) {
|
|
116
|
+
e.onAuthError && e.onAuthError(), s.onLoad ? v() : g.setError(w);
|
|
117
|
+
})) : s.onLoad ? v() : g.setSuccess();
|
|
118
|
+
}
|
|
119
|
+
return h.then(function() {
|
|
120
|
+
J().then(f).catch(function(d) {
|
|
121
|
+
m.setError(d);
|
|
122
|
+
});
|
|
123
|
+
}), h.catch(function(d) {
|
|
124
|
+
m.setError(d);
|
|
125
|
+
}), m.promise;
|
|
126
|
+
}, e.login = function(s) {
|
|
127
|
+
return n.login(s);
|
|
128
|
+
};
|
|
129
|
+
function E(s) {
|
|
130
|
+
if (typeof crypto > "u" || typeof crypto.getRandomValues > "u")
|
|
131
|
+
throw new Error("Web Crypto API is not available.");
|
|
132
|
+
return crypto.getRandomValues(new Uint8Array(s));
|
|
133
|
+
}
|
|
134
|
+
function k(s) {
|
|
135
|
+
return u(s, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
|
136
|
+
}
|
|
137
|
+
function u(s, l) {
|
|
138
|
+
for (var m = E(s), g = new Array(s), h = 0; h < s; h++)
|
|
139
|
+
g[h] = l.charCodeAt(m[h] % l.length);
|
|
140
|
+
return String.fromCharCode.apply(null, g);
|
|
141
|
+
}
|
|
142
|
+
async function y(s, l) {
|
|
143
|
+
if (s !== "S256")
|
|
144
|
+
throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${s}'.`);
|
|
145
|
+
const m = new Uint8Array(await qn(l));
|
|
146
|
+
return Yn(m).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
|
|
147
|
+
}
|
|
148
|
+
function S(s) {
|
|
149
|
+
var l = {
|
|
150
|
+
id_token: {
|
|
151
|
+
acr: s
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return JSON.stringify(l);
|
|
155
|
+
}
|
|
156
|
+
e.createLoginUrl = async function(s) {
|
|
157
|
+
var l = X(), m = X(), g = n.redirectUri(s), h = {
|
|
158
|
+
state: l,
|
|
159
|
+
nonce: m,
|
|
160
|
+
redirectUri: encodeURIComponent(g),
|
|
161
|
+
loginOptions: s
|
|
162
|
+
};
|
|
163
|
+
s && s.prompt && (h.prompt = s.prompt);
|
|
164
|
+
var v;
|
|
165
|
+
s && s.action == "register" ? v = e.endpoints.register() : v = e.endpoints.authorize();
|
|
166
|
+
var f = s && s.scope || e.scope;
|
|
167
|
+
f ? f.indexOf("openid") === -1 && (f = "openid " + f) : f = "openid";
|
|
168
|
+
var d = v + "?client_id=" + encodeURIComponent(e.clientId) + "&redirect_uri=" + encodeURIComponent(g) + "&state=" + encodeURIComponent(l) + "&response_mode=" + encodeURIComponent(e.responseMode) + "&response_type=" + encodeURIComponent(e.responseType) + "&scope=" + encodeURIComponent(f);
|
|
169
|
+
if (c && (d = d + "&nonce=" + encodeURIComponent(m)), s && s.prompt && (d += "&prompt=" + encodeURIComponent(s.prompt)), s && typeof s.maxAge == "number" && (d += "&max_age=" + encodeURIComponent(s.maxAge)), s && s.loginHint && (d += "&login_hint=" + encodeURIComponent(s.loginHint)), s && s.idpHint && (d += "&kc_idp_hint=" + encodeURIComponent(s.idpHint)), s && s.action && s.action != "register" && (d += "&kc_action=" + encodeURIComponent(s.action)), s && s.locale && (d += "&ui_locales=" + encodeURIComponent(s.locale)), s && s.acr) {
|
|
170
|
+
var w = S(s.acr);
|
|
171
|
+
d += "&claims=" + encodeURIComponent(w);
|
|
172
|
+
}
|
|
173
|
+
if ((s && s.acrValues || e.acrValues) && (d += "&acr_values=" + encodeURIComponent(s.acrValues || e.acrValues)), e.pkceMethod)
|
|
174
|
+
try {
|
|
175
|
+
const I = k(96), O = await y(e.pkceMethod, I);
|
|
176
|
+
h.pkceCodeVerifier = I, d += "&code_challenge=" + O, d += "&code_challenge_method=" + e.pkceMethod;
|
|
177
|
+
} catch (I) {
|
|
178
|
+
throw new Error("Failed to generate PKCE challenge.", { cause: I });
|
|
179
|
+
}
|
|
180
|
+
return o.add(h), d;
|
|
181
|
+
}, e.logout = function(s) {
|
|
182
|
+
return n.logout(s);
|
|
183
|
+
}, e.createLogoutUrl = function(s) {
|
|
184
|
+
if (((s == null ? void 0 : s.logoutMethod) ?? e.logoutMethod) === "POST")
|
|
185
|
+
return e.endpoints.logout();
|
|
186
|
+
var m = e.endpoints.logout() + "?client_id=" + encodeURIComponent(e.clientId) + "&post_logout_redirect_uri=" + encodeURIComponent(n.redirectUri(s, !1));
|
|
187
|
+
return e.idToken && (m += "&id_token_hint=" + encodeURIComponent(e.idToken)), m;
|
|
188
|
+
}, e.register = function(s) {
|
|
189
|
+
return n.register(s);
|
|
190
|
+
}, e.createRegisterUrl = async function(s) {
|
|
191
|
+
return s || (s = {}), s.action = "register", await e.createLoginUrl(s);
|
|
192
|
+
}, e.createAccountUrl = function(s) {
|
|
193
|
+
var l = C(), m = void 0;
|
|
194
|
+
return typeof l < "u" && (m = l + "/account?referrer=" + encodeURIComponent(e.clientId) + "&referrer_uri=" + encodeURIComponent(n.redirectUri(s))), m;
|
|
195
|
+
}, e.accountManagement = function() {
|
|
196
|
+
return n.accountManagement();
|
|
197
|
+
}, e.hasRealmRole = function(s) {
|
|
198
|
+
var l = e.realmAccess;
|
|
199
|
+
return !!l && l.roles.indexOf(s) >= 0;
|
|
200
|
+
}, e.hasResourceRole = function(s, l) {
|
|
201
|
+
if (!e.resourceAccess)
|
|
202
|
+
return !1;
|
|
203
|
+
var m = e.resourceAccess[l || e.clientId];
|
|
204
|
+
return !!m && m.roles.indexOf(s) >= 0;
|
|
205
|
+
}, e.loadUserProfile = function() {
|
|
206
|
+
var s = C() + "/account", l = new XMLHttpRequest();
|
|
207
|
+
l.open("GET", s, !0), l.setRequestHeader("Accept", "application/json"), l.setRequestHeader("Authorization", "bearer " + e.token);
|
|
208
|
+
var m = A();
|
|
209
|
+
return l.onreadystatechange = function() {
|
|
210
|
+
l.readyState == 4 && (l.status == 200 ? (e.profile = JSON.parse(l.responseText), m.setSuccess(e.profile)) : m.setError());
|
|
211
|
+
}, l.send(), m.promise;
|
|
212
|
+
}, e.loadUserInfo = function() {
|
|
213
|
+
var s = e.endpoints.userinfo(), l = new XMLHttpRequest();
|
|
214
|
+
l.open("GET", s, !0), l.setRequestHeader("Accept", "application/json"), l.setRequestHeader("Authorization", "bearer " + e.token);
|
|
215
|
+
var m = A();
|
|
216
|
+
return l.onreadystatechange = function() {
|
|
217
|
+
l.readyState == 4 && (l.status == 200 ? (e.userInfo = JSON.parse(l.responseText), m.setSuccess(e.userInfo)) : m.setError());
|
|
218
|
+
}, l.send(), m.promise;
|
|
219
|
+
}, e.isTokenExpired = function(s) {
|
|
220
|
+
if (!e.tokenParsed || !e.refreshToken && e.flow != "implicit")
|
|
221
|
+
throw "Not authenticated";
|
|
222
|
+
if (e.timeSkew == null)
|
|
223
|
+
return a("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"), !0;
|
|
224
|
+
var l = e.tokenParsed.exp - Math.ceil((/* @__PURE__ */ new Date()).getTime() / 1e3) + e.timeSkew;
|
|
225
|
+
if (s) {
|
|
226
|
+
if (isNaN(s))
|
|
227
|
+
throw "Invalid minValidity";
|
|
228
|
+
l -= s;
|
|
229
|
+
}
|
|
230
|
+
return l < 0;
|
|
231
|
+
}, e.updateToken = function(s) {
|
|
232
|
+
var l = A();
|
|
233
|
+
if (!e.refreshToken)
|
|
234
|
+
return l.setError(), l.promise;
|
|
235
|
+
s = s || 5;
|
|
236
|
+
var m = function() {
|
|
237
|
+
var h = !1;
|
|
238
|
+
if (s == -1 ? (h = !0, a("[KEYCLOAK] Refreshing token: forced refresh")) : (!e.tokenParsed || e.isTokenExpired(s)) && (h = !0, a("[KEYCLOAK] Refreshing token: token expired")), !h)
|
|
239
|
+
l.setSuccess(!1);
|
|
240
|
+
else {
|
|
241
|
+
var v = "grant_type=refresh_token&refresh_token=" + e.refreshToken, f = e.endpoints.token();
|
|
242
|
+
if (r.push(l), r.length == 1) {
|
|
243
|
+
var d = new XMLHttpRequest();
|
|
244
|
+
d.open("POST", f, !0), d.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), d.withCredentials = !0, v += "&client_id=" + encodeURIComponent(e.clientId);
|
|
245
|
+
var w = (/* @__PURE__ */ new Date()).getTime();
|
|
246
|
+
d.onreadystatechange = function() {
|
|
247
|
+
if (d.readyState == 4)
|
|
248
|
+
if (d.status == 200) {
|
|
249
|
+
a("[KEYCLOAK] Token refreshed"), w = (w + (/* @__PURE__ */ new Date()).getTime()) / 2;
|
|
250
|
+
var I = JSON.parse(d.responseText);
|
|
251
|
+
z(I.access_token, I.refresh_token, I.id_token, w), e.onAuthRefreshSuccess && e.onAuthRefreshSuccess();
|
|
252
|
+
for (var O = r.pop(); O != null; O = r.pop())
|
|
253
|
+
O.setSuccess(!0);
|
|
254
|
+
} else {
|
|
255
|
+
p("[KEYCLOAK] Failed to refresh token"), d.status == 400 && e.clearToken(), e.onAuthRefreshError && e.onAuthRefreshError();
|
|
256
|
+
for (var O = r.pop(); O != null; O = r.pop())
|
|
257
|
+
O.setError("Failed to refresh token: An unexpected HTTP error occurred while attempting to refresh the token.");
|
|
258
|
+
}
|
|
259
|
+
}, d.send(v);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
if (i.enable) {
|
|
264
|
+
var g = D();
|
|
265
|
+
g.then(function() {
|
|
266
|
+
m();
|
|
267
|
+
}).catch(function(h) {
|
|
268
|
+
l.setError(h);
|
|
269
|
+
});
|
|
270
|
+
} else
|
|
271
|
+
m();
|
|
272
|
+
return l.promise;
|
|
273
|
+
}, e.clearToken = function() {
|
|
274
|
+
e.token && (z(null, null, null), e.onAuthLogout && e.onAuthLogout(), e.loginRequired && e.login());
|
|
275
|
+
};
|
|
276
|
+
function C() {
|
|
277
|
+
if (typeof e.authServerUrl < "u")
|
|
278
|
+
return e.authServerUrl.charAt(e.authServerUrl.length - 1) == "/" ? e.authServerUrl + "realms/" + encodeURIComponent(e.realm) : e.authServerUrl + "/realms/" + encodeURIComponent(e.realm);
|
|
279
|
+
}
|
|
280
|
+
function L() {
|
|
281
|
+
return window.location.origin ? window.location.origin : window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
|
|
282
|
+
}
|
|
283
|
+
function j(s, l) {
|
|
284
|
+
var m = s.code, g = s.error, h = s.prompt, v = (/* @__PURE__ */ new Date()).getTime();
|
|
285
|
+
if (s.kc_action_status && e.onActionUpdate && e.onActionUpdate(s.kc_action_status, s.kc_action), g) {
|
|
286
|
+
if (h != "none")
|
|
287
|
+
if (s.error_description && s.error_description === "authentication_expired")
|
|
288
|
+
e.login(s.loginOptions);
|
|
289
|
+
else {
|
|
290
|
+
var f = { error: g, error_description: s.error_description };
|
|
291
|
+
e.onAuthError && e.onAuthError(f), l && l.setError(f);
|
|
292
|
+
}
|
|
293
|
+
else
|
|
294
|
+
l && l.setSuccess();
|
|
295
|
+
return;
|
|
296
|
+
} else e.flow != "standard" && (s.access_token || s.id_token) && O(s.access_token, null, s.id_token, !0);
|
|
297
|
+
if (e.flow != "implicit" && m) {
|
|
298
|
+
var d = "code=" + m + "&grant_type=authorization_code", w = e.endpoints.token(), I = new XMLHttpRequest();
|
|
299
|
+
I.open("POST", w, !0), I.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), d += "&client_id=" + encodeURIComponent(e.clientId), d += "&redirect_uri=" + s.redirectUri, s.pkceCodeVerifier && (d += "&code_verifier=" + s.pkceCodeVerifier), I.withCredentials = !0, I.onreadystatechange = function() {
|
|
300
|
+
if (I.readyState == 4)
|
|
301
|
+
if (I.status == 200) {
|
|
302
|
+
var U = JSON.parse(I.responseText);
|
|
303
|
+
O(U.access_token, U.refresh_token, U.id_token, e.flow === "standard"), _();
|
|
304
|
+
} else
|
|
305
|
+
e.onAuthError && e.onAuthError(), l && l.setError();
|
|
306
|
+
}, I.send(d);
|
|
307
|
+
}
|
|
308
|
+
function O(U, Y, ce, se) {
|
|
309
|
+
v = (v + (/* @__PURE__ */ new Date()).getTime()) / 2, z(U, Y, ce, v), c && e.idTokenParsed && e.idTokenParsed.nonce != s.storedNonce ? (a("[KEYCLOAK] Invalid nonce, clearing token"), e.clearToken(), l && l.setError()) : se && (e.onAuthSuccess && e.onAuthSuccess(), l && l.setSuccess());
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
function de() {
|
|
313
|
+
var s = A(), l;
|
|
314
|
+
typeof t == "string" && (l = t);
|
|
315
|
+
function m(f) {
|
|
316
|
+
f ? e.endpoints = {
|
|
317
|
+
authorize: function() {
|
|
318
|
+
return f.authorization_endpoint;
|
|
319
|
+
},
|
|
320
|
+
token: function() {
|
|
321
|
+
return f.token_endpoint;
|
|
322
|
+
},
|
|
323
|
+
logout: function() {
|
|
324
|
+
if (!f.end_session_endpoint)
|
|
325
|
+
throw "Not supported by the OIDC server";
|
|
326
|
+
return f.end_session_endpoint;
|
|
327
|
+
},
|
|
328
|
+
checkSessionIframe: function() {
|
|
329
|
+
if (!f.check_session_iframe)
|
|
330
|
+
throw "Not supported by the OIDC server";
|
|
331
|
+
return f.check_session_iframe;
|
|
332
|
+
},
|
|
333
|
+
register: function() {
|
|
334
|
+
throw 'Redirection to "Register user" page not supported in standard OIDC mode';
|
|
335
|
+
},
|
|
336
|
+
userinfo: function() {
|
|
337
|
+
if (!f.userinfo_endpoint)
|
|
338
|
+
throw "Not supported by the OIDC server";
|
|
339
|
+
return f.userinfo_endpoint;
|
|
340
|
+
}
|
|
341
|
+
} : e.endpoints = {
|
|
342
|
+
authorize: function() {
|
|
343
|
+
return C() + "/protocol/openid-connect/auth";
|
|
344
|
+
},
|
|
345
|
+
token: function() {
|
|
346
|
+
return C() + "/protocol/openid-connect/token";
|
|
347
|
+
},
|
|
348
|
+
logout: function() {
|
|
349
|
+
return C() + "/protocol/openid-connect/logout";
|
|
350
|
+
},
|
|
351
|
+
checkSessionIframe: function() {
|
|
352
|
+
return C() + "/protocol/openid-connect/login-status-iframe.html";
|
|
353
|
+
},
|
|
354
|
+
thirdPartyCookiesIframe: function() {
|
|
355
|
+
return C() + "/protocol/openid-connect/3p-cookies/step1.html";
|
|
356
|
+
},
|
|
357
|
+
register: function() {
|
|
358
|
+
return C() + "/protocol/openid-connect/registrations";
|
|
359
|
+
},
|
|
360
|
+
userinfo: function() {
|
|
361
|
+
return C() + "/protocol/openid-connect/userinfo";
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
if (l) {
|
|
366
|
+
var g = new XMLHttpRequest();
|
|
367
|
+
g.open("GET", l, !0), g.setRequestHeader("Accept", "application/json"), g.onreadystatechange = function() {
|
|
368
|
+
if (g.readyState == 4)
|
|
369
|
+
if (g.status == 200 || te(g)) {
|
|
370
|
+
var f = JSON.parse(g.responseText);
|
|
371
|
+
e.authServerUrl = f["auth-server-url"], e.realm = f.realm, e.clientId = f.resource, m(null), s.setSuccess();
|
|
372
|
+
} else
|
|
373
|
+
s.setError();
|
|
374
|
+
}, g.send();
|
|
375
|
+
} else {
|
|
376
|
+
e.clientId = t.clientId;
|
|
377
|
+
var h = t.oidcProvider;
|
|
378
|
+
if (!h)
|
|
379
|
+
e.authServerUrl = t.url, e.realm = t.realm, m(null), s.setSuccess();
|
|
380
|
+
else if (typeof h == "string") {
|
|
381
|
+
var v;
|
|
382
|
+
h.charAt(h.length - 1) == "/" ? v = h + ".well-known/openid-configuration" : v = h + "/.well-known/openid-configuration";
|
|
383
|
+
var g = new XMLHttpRequest();
|
|
384
|
+
g.open("GET", v, !0), g.setRequestHeader("Accept", "application/json"), g.onreadystatechange = function() {
|
|
385
|
+
if (g.readyState == 4)
|
|
386
|
+
if (g.status == 200 || te(g)) {
|
|
387
|
+
var d = JSON.parse(g.responseText);
|
|
388
|
+
m(d), s.setSuccess();
|
|
389
|
+
} else
|
|
390
|
+
s.setError();
|
|
391
|
+
}, g.send();
|
|
392
|
+
} else
|
|
393
|
+
m(h), s.setSuccess();
|
|
394
|
+
}
|
|
395
|
+
return s.promise;
|
|
396
|
+
}
|
|
397
|
+
function te(s) {
|
|
398
|
+
return s.status == 0 && s.responseText && s.responseURL.startsWith("file:");
|
|
399
|
+
}
|
|
400
|
+
function z(s, l, m, g) {
|
|
401
|
+
if (e.tokenTimeoutHandle && (clearTimeout(e.tokenTimeoutHandle), e.tokenTimeoutHandle = null), l ? (e.refreshToken = l, e.refreshTokenParsed = gt(l)) : (delete e.refreshToken, delete e.refreshTokenParsed), m ? (e.idToken = m, e.idTokenParsed = gt(m)) : (delete e.idToken, delete e.idTokenParsed), s) {
|
|
402
|
+
if (e.token = s, e.tokenParsed = gt(s), e.sessionId = e.tokenParsed.sid, e.authenticated = !0, e.subject = e.tokenParsed.sub, e.realmAccess = e.tokenParsed.realm_access, e.resourceAccess = e.tokenParsed.resource_access, g && (e.timeSkew = Math.floor(g / 1e3) - e.tokenParsed.iat), e.timeSkew != null && (a("[KEYCLOAK] Estimated time difference between browser and server is " + e.timeSkew + " seconds"), e.onTokenExpired)) {
|
|
403
|
+
var h = (e.tokenParsed.exp - (/* @__PURE__ */ new Date()).getTime() / 1e3 + e.timeSkew) * 1e3;
|
|
404
|
+
a("[KEYCLOAK] Token expires in " + Math.round(h / 1e3) + " s"), h <= 0 ? e.onTokenExpired() : e.tokenTimeoutHandle = setTimeout(e.onTokenExpired, h);
|
|
405
|
+
}
|
|
406
|
+
} else
|
|
407
|
+
delete e.token, delete e.tokenParsed, delete e.subject, delete e.realmAccess, delete e.resourceAccess, e.authenticated = !1;
|
|
408
|
+
}
|
|
409
|
+
function X() {
|
|
410
|
+
if (typeof crypto > "u" || typeof crypto.randomUUID > "u")
|
|
411
|
+
throw new Error("Web Crypto API is not available.");
|
|
412
|
+
return crypto.randomUUID();
|
|
413
|
+
}
|
|
414
|
+
function T(s) {
|
|
415
|
+
var l = H(s);
|
|
416
|
+
if (l) {
|
|
417
|
+
var m = o.get(l.state);
|
|
418
|
+
return m && (l.valid = !0, l.redirectUri = m.redirectUri, l.storedNonce = m.nonce, l.prompt = m.prompt, l.pkceCodeVerifier = m.pkceCodeVerifier, l.loginOptions = m.loginOptions), l;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
function H(s) {
|
|
422
|
+
var l;
|
|
423
|
+
switch (e.flow) {
|
|
424
|
+
case "standard":
|
|
425
|
+
l = ["code", "state", "session_state", "kc_action_status", "kc_action", "iss"];
|
|
426
|
+
break;
|
|
427
|
+
case "implicit":
|
|
428
|
+
l = ["access_token", "token_type", "id_token", "state", "session_state", "expires_in", "kc_action_status", "kc_action", "iss"];
|
|
429
|
+
break;
|
|
430
|
+
case "hybrid":
|
|
431
|
+
l = ["access_token", "token_type", "id_token", "code", "state", "session_state", "expires_in", "kc_action_status", "kc_action", "iss"];
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
l.push("error"), l.push("error_description"), l.push("error_uri");
|
|
435
|
+
var m = s.indexOf("?"), g = s.indexOf("#"), h, v;
|
|
436
|
+
if (e.responseMode === "query" && m !== -1 ? (h = s.substring(0, m), v = N(s.substring(m + 1, g !== -1 ? g : s.length), l), v.paramsString !== "" && (h += "?" + v.paramsString), g !== -1 && (h += s.substring(g))) : e.responseMode === "fragment" && g !== -1 && (h = s.substring(0, g), v = N(s.substring(g + 1), l), v.paramsString !== "" && (h += "#" + v.paramsString)), v && v.oauthParams) {
|
|
437
|
+
if (e.flow === "standard" || e.flow === "hybrid") {
|
|
438
|
+
if ((v.oauthParams.code || v.oauthParams.error) && v.oauthParams.state)
|
|
439
|
+
return v.oauthParams.newUrl = h, v.oauthParams;
|
|
440
|
+
} else if (e.flow === "implicit" && (v.oauthParams.access_token || v.oauthParams.error) && v.oauthParams.state)
|
|
441
|
+
return v.oauthParams.newUrl = h, v.oauthParams;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
function N(s, l) {
|
|
445
|
+
for (var m = s.split("&"), g = {
|
|
446
|
+
paramsString: "",
|
|
447
|
+
oauthParams: {}
|
|
448
|
+
}, h = 0; h < m.length; h++) {
|
|
449
|
+
var v = m[h].indexOf("="), f = m[h].slice(0, v);
|
|
450
|
+
l.indexOf(f) !== -1 ? g.oauthParams[f] = m[h].slice(v + 1) : (g.paramsString !== "" && (g.paramsString += "&"), g.paramsString += m[h]);
|
|
451
|
+
}
|
|
452
|
+
return g;
|
|
453
|
+
}
|
|
454
|
+
function A() {
|
|
455
|
+
var s = {
|
|
456
|
+
setSuccess: function(l) {
|
|
457
|
+
s.resolve(l);
|
|
458
|
+
},
|
|
459
|
+
setError: function(l) {
|
|
460
|
+
s.reject(l);
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
return s.promise = new Promise(function(l, m) {
|
|
464
|
+
s.resolve = l, s.reject = m;
|
|
465
|
+
}), s;
|
|
466
|
+
}
|
|
467
|
+
function re(s, l, m) {
|
|
468
|
+
var g = null, h = new Promise(function(v, f) {
|
|
469
|
+
g = setTimeout(function() {
|
|
470
|
+
f({ error: m });
|
|
471
|
+
}, l);
|
|
472
|
+
});
|
|
473
|
+
return Promise.race([s, h]).finally(function() {
|
|
474
|
+
clearTimeout(g);
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
function b() {
|
|
478
|
+
var s = A();
|
|
479
|
+
if (!i.enable || i.iframe)
|
|
480
|
+
return s.setSuccess(), s.promise;
|
|
481
|
+
var l = document.createElement("iframe");
|
|
482
|
+
i.iframe = l, l.onload = function() {
|
|
483
|
+
var h = e.endpoints.authorize();
|
|
484
|
+
h.charAt(0) === "/" ? i.iframeOrigin = L() : i.iframeOrigin = h.substring(0, h.indexOf("/", 8)), s.setSuccess();
|
|
485
|
+
};
|
|
486
|
+
var m = e.endpoints.checkSessionIframe();
|
|
487
|
+
l.setAttribute("src", m), l.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), l.setAttribute("title", "keycloak-session-iframe"), l.style.display = "none", document.body.appendChild(l);
|
|
488
|
+
var g = function(h) {
|
|
489
|
+
if (!(h.origin !== i.iframeOrigin || i.iframe.contentWindow !== h.source) && (h.data == "unchanged" || h.data == "changed" || h.data == "error")) {
|
|
490
|
+
h.data != "unchanged" && e.clearToken();
|
|
491
|
+
for (var v = i.callbackList.splice(0, i.callbackList.length), f = v.length - 1; f >= 0; --f) {
|
|
492
|
+
var d = v[f];
|
|
493
|
+
h.data == "error" ? d.setError() : d.setSuccess(h.data == "unchanged");
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
return window.addEventListener("message", g, !1), s.promise;
|
|
498
|
+
}
|
|
499
|
+
function _() {
|
|
500
|
+
i.enable && e.token && setTimeout(function() {
|
|
501
|
+
D().then(function(s) {
|
|
502
|
+
s && _();
|
|
503
|
+
});
|
|
504
|
+
}, i.interval * 1e3);
|
|
505
|
+
}
|
|
506
|
+
function D() {
|
|
507
|
+
var s = A();
|
|
508
|
+
if (i.iframe && i.iframeOrigin) {
|
|
509
|
+
var l = e.clientId + " " + (e.sessionId ? e.sessionId : "");
|
|
510
|
+
i.callbackList.push(s);
|
|
511
|
+
var m = i.iframeOrigin;
|
|
512
|
+
i.callbackList.length == 1 && i.iframe.contentWindow.postMessage(l, m);
|
|
513
|
+
} else
|
|
514
|
+
s.setSuccess();
|
|
515
|
+
return s.promise;
|
|
516
|
+
}
|
|
517
|
+
function J() {
|
|
518
|
+
var s = A();
|
|
519
|
+
if ((i.enable || e.silentCheckSsoRedirectUri) && typeof e.endpoints.thirdPartyCookiesIframe == "function") {
|
|
520
|
+
var l = document.createElement("iframe");
|
|
521
|
+
l.setAttribute("src", e.endpoints.thirdPartyCookiesIframe()), l.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), l.setAttribute("title", "keycloak-3p-check-iframe"), l.style.display = "none", document.body.appendChild(l);
|
|
522
|
+
var m = function(g) {
|
|
523
|
+
l.contentWindow === g.source && (g.data !== "supported" && g.data !== "unsupported" || (g.data === "unsupported" && (p(
|
|
524
|
+
`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
525
|
+
|
|
526
|
+
- It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
|
|
527
|
+
- It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
|
|
528
|
+
|
|
529
|
+
For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers`
|
|
530
|
+
), i.enable = !1, e.silentCheckSsoFallback && (e.silentCheckSsoRedirectUri = !1)), document.body.removeChild(l), window.removeEventListener("message", m), s.setSuccess()));
|
|
531
|
+
};
|
|
532
|
+
window.addEventListener("message", m, !1);
|
|
533
|
+
} else
|
|
534
|
+
s.setSuccess();
|
|
535
|
+
return re(s.promise, e.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
|
|
536
|
+
}
|
|
537
|
+
function ie(s) {
|
|
538
|
+
if (!s || s == "default")
|
|
539
|
+
return {
|
|
540
|
+
login: async function(f) {
|
|
541
|
+
return window.location.assign(await e.createLoginUrl(f)), A().promise;
|
|
542
|
+
},
|
|
543
|
+
logout: async function(f) {
|
|
544
|
+
if (((f == null ? void 0 : f.logoutMethod) ?? e.logoutMethod) === "GET") {
|
|
545
|
+
window.location.replace(e.createLogoutUrl(f));
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
const w = document.createElement("form");
|
|
549
|
+
w.setAttribute("method", "POST"), w.setAttribute("action", e.createLogoutUrl(f)), w.style.display = "none";
|
|
550
|
+
const I = {
|
|
551
|
+
id_token_hint: e.idToken,
|
|
552
|
+
client_id: e.clientId,
|
|
553
|
+
post_logout_redirect_uri: n.redirectUri(f, !1)
|
|
554
|
+
};
|
|
555
|
+
for (const [O, U] of Object.entries(I)) {
|
|
556
|
+
const Y = document.createElement("input");
|
|
557
|
+
Y.setAttribute("type", "hidden"), Y.setAttribute("name", O), Y.setAttribute("value", U), w.appendChild(Y);
|
|
558
|
+
}
|
|
559
|
+
document.body.appendChild(w), w.submit();
|
|
560
|
+
},
|
|
561
|
+
register: async function(f) {
|
|
562
|
+
return window.location.assign(await e.createRegisterUrl(f)), A().promise;
|
|
563
|
+
},
|
|
564
|
+
accountManagement: function() {
|
|
565
|
+
var f = e.createAccountUrl();
|
|
566
|
+
if (typeof f < "u")
|
|
567
|
+
window.location.href = f;
|
|
568
|
+
else
|
|
569
|
+
throw "Not supported by the OIDC server";
|
|
570
|
+
return A().promise;
|
|
571
|
+
},
|
|
572
|
+
redirectUri: function(f, d) {
|
|
573
|
+
return f && f.redirectUri ? f.redirectUri : e.redirectUri ? e.redirectUri : location.href;
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
if (s == "cordova") {
|
|
577
|
+
i.enable = !1;
|
|
578
|
+
var l = function(f, d, w) {
|
|
579
|
+
return window.cordova && window.cordova.InAppBrowser ? window.cordova.InAppBrowser.open(f, d, w) : window.open(f, d, w);
|
|
580
|
+
}, m = function(f) {
|
|
581
|
+
return f && f.cordovaOptions ? Object.keys(f.cordovaOptions).reduce(function(d, w) {
|
|
582
|
+
return d[w] = f.cordovaOptions[w], d;
|
|
583
|
+
}, {}) : {};
|
|
584
|
+
}, g = function(f) {
|
|
585
|
+
return Object.keys(f).reduce(function(d, w) {
|
|
586
|
+
return d.push(w + "=" + f[w]), d;
|
|
587
|
+
}, []).join(",");
|
|
588
|
+
}, h = function(f) {
|
|
589
|
+
var d = m(f);
|
|
590
|
+
return d.location = "no", f && f.prompt == "none" && (d.hidden = "yes"), g(d);
|
|
591
|
+
}, v = function() {
|
|
592
|
+
return e.redirectUri || "http://localhost";
|
|
593
|
+
};
|
|
594
|
+
return {
|
|
595
|
+
login: async function(f) {
|
|
596
|
+
var d = A(), w = h(f), I = await e.createLoginUrl(f), O = l(I, "_blank", w), U = !1, Y = !1, ce = function() {
|
|
597
|
+
Y = !0, O.close();
|
|
598
|
+
};
|
|
599
|
+
return O.addEventListener("loadstart", function(se) {
|
|
600
|
+
if (se.url.indexOf(v()) == 0) {
|
|
601
|
+
var ht = T(se.url);
|
|
602
|
+
j(ht, d), ce(), U = !0;
|
|
603
|
+
}
|
|
604
|
+
}), O.addEventListener("loaderror", function(se) {
|
|
605
|
+
if (!U)
|
|
606
|
+
if (se.url.indexOf(v()) == 0) {
|
|
607
|
+
var ht = T(se.url);
|
|
608
|
+
j(ht, d), ce(), U = !0;
|
|
609
|
+
} else
|
|
610
|
+
d.setError(), ce();
|
|
611
|
+
}), O.addEventListener("exit", function(se) {
|
|
612
|
+
Y || d.setError({
|
|
613
|
+
reason: "closed_by_user"
|
|
614
|
+
});
|
|
615
|
+
}), d.promise;
|
|
616
|
+
},
|
|
617
|
+
logout: function(f) {
|
|
618
|
+
var d = A(), w = e.createLogoutUrl(f), I = l(w, "_blank", "location=no,hidden=yes,clearcache=yes"), O;
|
|
619
|
+
return I.addEventListener("loadstart", function(U) {
|
|
620
|
+
U.url.indexOf(v()) == 0 && I.close();
|
|
621
|
+
}), I.addEventListener("loaderror", function(U) {
|
|
622
|
+
U.url.indexOf(v()) == 0 || (O = !0), I.close();
|
|
623
|
+
}), I.addEventListener("exit", function(U) {
|
|
624
|
+
O ? d.setError() : (e.clearToken(), d.setSuccess());
|
|
625
|
+
}), d.promise;
|
|
626
|
+
},
|
|
627
|
+
register: async function(f) {
|
|
628
|
+
var d = A(), w = await e.createRegisterUrl(), I = h(f), O = l(w, "_blank", I);
|
|
629
|
+
return O.addEventListener("loadstart", function(U) {
|
|
630
|
+
if (U.url.indexOf(v()) == 0) {
|
|
631
|
+
O.close();
|
|
632
|
+
var Y = T(U.url);
|
|
633
|
+
j(Y, d);
|
|
634
|
+
}
|
|
635
|
+
}), d.promise;
|
|
636
|
+
},
|
|
637
|
+
accountManagement: function() {
|
|
638
|
+
var f = e.createAccountUrl();
|
|
639
|
+
if (typeof f < "u") {
|
|
640
|
+
var d = l(f, "_blank", "location=no");
|
|
641
|
+
d.addEventListener("loadstart", function(w) {
|
|
642
|
+
w.url.indexOf(v()) == 0 && d.close();
|
|
643
|
+
});
|
|
644
|
+
} else
|
|
645
|
+
throw "Not supported by the OIDC server";
|
|
646
|
+
},
|
|
647
|
+
redirectUri: function(f) {
|
|
648
|
+
return v();
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
if (s == "cordova-native")
|
|
653
|
+
return i.enable = !1, {
|
|
654
|
+
login: async function(f) {
|
|
655
|
+
var d = A(), w = await e.createLoginUrl(f);
|
|
656
|
+
return universalLinks.subscribe("keycloak", function(I) {
|
|
657
|
+
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
658
|
+
var O = T(I.url);
|
|
659
|
+
j(O, d);
|
|
660
|
+
}), window.cordova.plugins.browsertab.openUrl(w), d.promise;
|
|
661
|
+
},
|
|
662
|
+
logout: function(f) {
|
|
663
|
+
var d = A(), w = e.createLogoutUrl(f);
|
|
664
|
+
return universalLinks.subscribe("keycloak", function(I) {
|
|
665
|
+
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close(), e.clearToken(), d.setSuccess();
|
|
666
|
+
}), window.cordova.plugins.browsertab.openUrl(w), d.promise;
|
|
667
|
+
},
|
|
668
|
+
register: async function(f) {
|
|
669
|
+
var d = A(), w = await e.createRegisterUrl(f);
|
|
670
|
+
return universalLinks.subscribe("keycloak", function(I) {
|
|
671
|
+
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
672
|
+
var O = T(I.url);
|
|
673
|
+
j(O, d);
|
|
674
|
+
}), window.cordova.plugins.browsertab.openUrl(w), d.promise;
|
|
675
|
+
},
|
|
676
|
+
accountManagement: function() {
|
|
677
|
+
var f = e.createAccountUrl();
|
|
678
|
+
if (typeof f < "u")
|
|
679
|
+
window.cordova.plugins.browsertab.openUrl(f);
|
|
680
|
+
else
|
|
681
|
+
throw "Not supported by the OIDC server";
|
|
682
|
+
},
|
|
683
|
+
redirectUri: function(f) {
|
|
684
|
+
return f && f.redirectUri ? f.redirectUri : e.redirectUri ? e.redirectUri : "http://localhost";
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
throw "invalid adapter type: " + s;
|
|
688
|
+
}
|
|
689
|
+
const oe = "kc-callback-";
|
|
690
|
+
var De = function() {
|
|
691
|
+
if (!(this instanceof De))
|
|
692
|
+
return new De();
|
|
693
|
+
localStorage.setItem("kc-test", "test"), localStorage.removeItem("kc-test");
|
|
694
|
+
var s = this;
|
|
695
|
+
function l() {
|
|
696
|
+
const v = Date.now();
|
|
697
|
+
for (const [f, d] of g()) {
|
|
698
|
+
const w = h(d);
|
|
699
|
+
(w === null || w < v) && localStorage.removeItem(f);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
function m() {
|
|
703
|
+
for (const [v] of g())
|
|
704
|
+
localStorage.removeItem(v);
|
|
705
|
+
}
|
|
706
|
+
function g() {
|
|
707
|
+
return Object.entries(localStorage).filter(([v]) => v.startsWith(oe));
|
|
708
|
+
}
|
|
709
|
+
function h(v) {
|
|
710
|
+
let f;
|
|
711
|
+
try {
|
|
712
|
+
f = JSON.parse(v);
|
|
713
|
+
} catch {
|
|
714
|
+
return null;
|
|
715
|
+
}
|
|
716
|
+
return mt(f) && "expires" in f && typeof f.expires == "number" ? f.expires : null;
|
|
717
|
+
}
|
|
718
|
+
s.get = function(v) {
|
|
719
|
+
if (v) {
|
|
720
|
+
var f = oe + v, d = localStorage.getItem(f);
|
|
721
|
+
return d && (localStorage.removeItem(f), d = JSON.parse(d)), l(), d;
|
|
722
|
+
}
|
|
723
|
+
}, s.add = function(v) {
|
|
724
|
+
l();
|
|
725
|
+
const f = oe + v.state, d = JSON.stringify({
|
|
726
|
+
...v,
|
|
727
|
+
// Set the expiry time to 1 hour from now.
|
|
728
|
+
expires: Date.now() + 60 * 60 * 1e3
|
|
729
|
+
});
|
|
730
|
+
try {
|
|
731
|
+
localStorage.setItem(f, d);
|
|
732
|
+
} catch {
|
|
733
|
+
m(), localStorage.setItem(f, d);
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
}, Ae = function() {
|
|
737
|
+
if (!(this instanceof Ae))
|
|
738
|
+
return new Ae();
|
|
739
|
+
var s = this;
|
|
740
|
+
s.get = function(h) {
|
|
741
|
+
if (h) {
|
|
742
|
+
var v = m(oe + h);
|
|
743
|
+
if (g(oe + h, "", l(-100)), v)
|
|
744
|
+
return JSON.parse(v);
|
|
745
|
+
}
|
|
746
|
+
}, s.add = function(h) {
|
|
747
|
+
g(oe + h.state, JSON.stringify(h), l(60));
|
|
748
|
+
}, s.removeItem = function(h) {
|
|
749
|
+
g(h, "", l(-100));
|
|
750
|
+
};
|
|
751
|
+
var l = function(h) {
|
|
752
|
+
var v = /* @__PURE__ */ new Date();
|
|
753
|
+
return v.setTime(v.getTime() + h * 60 * 1e3), v;
|
|
754
|
+
}, m = function(h) {
|
|
755
|
+
for (var v = h + "=", f = document.cookie.split(";"), d = 0; d < f.length; d++) {
|
|
756
|
+
for (var w = f[d]; w.charAt(0) == " "; )
|
|
757
|
+
w = w.substring(1);
|
|
758
|
+
if (w.indexOf(v) == 0)
|
|
759
|
+
return w.substring(v.length, w.length);
|
|
760
|
+
}
|
|
761
|
+
return "";
|
|
762
|
+
}, g = function(h, v, f) {
|
|
763
|
+
var d = h + "=" + v + "; expires=" + f.toUTCString() + "; ";
|
|
764
|
+
document.cookie = d;
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
function ye() {
|
|
768
|
+
try {
|
|
769
|
+
return new De();
|
|
770
|
+
} catch {
|
|
771
|
+
}
|
|
772
|
+
return new Ae();
|
|
773
|
+
}
|
|
774
|
+
function $(s) {
|
|
775
|
+
return function() {
|
|
776
|
+
e.enableLogging && s.apply(console, Array.prototype.slice.call(arguments));
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
function Yn(t) {
|
|
781
|
+
const e = String.fromCodePoint(...t);
|
|
782
|
+
return btoa(e);
|
|
783
|
+
}
|
|
784
|
+
async function qn(t) {
|
|
785
|
+
const n = new TextEncoder().encode(t);
|
|
786
|
+
if (typeof crypto > "u" || typeof crypto.subtle > "u")
|
|
787
|
+
throw new Error("Web Crypto API is not available.");
|
|
788
|
+
return await crypto.subtle.digest("SHA-256", n);
|
|
789
|
+
}
|
|
790
|
+
function gt(t) {
|
|
791
|
+
const [e, n] = t.split(".");
|
|
792
|
+
if (typeof n != "string")
|
|
793
|
+
throw new Error("Unable to decode token, payload not found.");
|
|
794
|
+
let r;
|
|
795
|
+
try {
|
|
796
|
+
r = Bn(n);
|
|
797
|
+
} catch (o) {
|
|
798
|
+
throw new Error("Unable to decode token, payload is not a valid Base64URL value.", { cause: o });
|
|
799
|
+
}
|
|
800
|
+
try {
|
|
801
|
+
return JSON.parse(r);
|
|
802
|
+
} catch (o) {
|
|
803
|
+
throw new Error("Unable to decode token, payload is not a valid JSON value.", { cause: o });
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
function Bn(t) {
|
|
807
|
+
let e = t.replaceAll("-", "+").replaceAll("_", "/");
|
|
808
|
+
switch (e.length % 4) {
|
|
809
|
+
case 0:
|
|
810
|
+
break;
|
|
811
|
+
case 2:
|
|
812
|
+
e += "==";
|
|
813
|
+
break;
|
|
814
|
+
case 3:
|
|
815
|
+
e += "=";
|
|
816
|
+
break;
|
|
817
|
+
default:
|
|
818
|
+
throw new Error("Input is not of the correct length.");
|
|
819
|
+
}
|
|
820
|
+
try {
|
|
821
|
+
return Gn(e);
|
|
822
|
+
} catch {
|
|
823
|
+
return atob(e);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
function Gn(t) {
|
|
827
|
+
return decodeURIComponent(atob(t).replace(/(.)/g, (e, n) => {
|
|
828
|
+
let r = n.charCodeAt(0).toString(16).toUpperCase();
|
|
829
|
+
return r.length < 2 && (r = "0" + r), "%" + r;
|
|
830
|
+
}));
|
|
831
|
+
}
|
|
832
|
+
function mt(t) {
|
|
833
|
+
return typeof t == "object" && t !== null;
|
|
834
|
+
}
|
|
835
|
+
const Xn = {};
|
|
836
|
+
class xt extends en {
|
|
837
|
+
constructor() {
|
|
838
|
+
const { VITE_KEYCLOAK_REALM: e, VITE_KEYCLOAK_HOST: n, VITE_KEYCLOAK_CLIENT_ID: r } = Xn;
|
|
839
|
+
super({
|
|
840
|
+
url: n,
|
|
841
|
+
realm: e,
|
|
842
|
+
clientId: r
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
async initialize() {
|
|
846
|
+
try {
|
|
847
|
+
await this.init(
|
|
848
|
+
{
|
|
849
|
+
onLoad: "login-required"
|
|
850
|
+
}
|
|
851
|
+
) && console.log("User is authenticated"), console.log("User is not authenticated");
|
|
852
|
+
} catch (e) {
|
|
853
|
+
console.error("Failed to initialize adapter:", e);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
static async init() {
|
|
857
|
+
const e = new xt();
|
|
858
|
+
return await e.initialize(), e;
|
|
859
|
+
}
|
|
860
|
+
get userInfo() {
|
|
861
|
+
return this.idTokenParsed;
|
|
862
|
+
}
|
|
863
|
+
updateToken() {
|
|
864
|
+
return this.updateToken(30);
|
|
865
|
+
}
|
|
866
|
+
get isAuthenticated() {
|
|
867
|
+
return this.authenticated ?? !1;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* @vue/shared v3.5.13
|
|
872
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
873
|
+
* @license MIT
|
|
874
|
+
**/
|
|
875
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
876
|
+
// @__NO_SIDE_EFFECTS__
|
|
877
|
+
function Qn(t) {
|
|
878
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
879
|
+
for (const n of t.split(",")) e[n] = 1;
|
|
880
|
+
return (n) => n in e;
|
|
881
|
+
}
|
|
882
|
+
const $e = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
883
|
+
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
884
|
+
const Re = () => {
|
|
885
|
+
}, Zn = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
|
|
886
|
+
(t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), _e = Object.assign, er = (t, e) => {
|
|
887
|
+
const n = t.indexOf(e);
|
|
888
|
+
n > -1 && t.splice(n, 1);
|
|
889
|
+
}, tr = Object.prototype.hasOwnProperty, et = (t, e) => tr.call(t, e), V = Array.isArray, Ce = (t) => lt(t) === "[object Map]", nr = (t) => lt(t) === "[object Set]", M = (t) => typeof t == "function", ue = (t) => typeof t == "string", Ye = (t) => typeof t == "symbol", B = (t) => t !== null && typeof t == "object", rr = (t) => (B(t) || M(t)) && M(t.then) && M(t.catch), or = Object.prototype.toString, lt = (t) => or.call(t), tn = (t) => lt(t).slice(8, -1), sr = (t) => lt(t) === "[object Object]", Dt = (t) => ue(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t, ir = (t) => {
|
|
890
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
891
|
+
return (n) => e[n] || (e[n] = t(n));
|
|
892
|
+
}, cr = ir((t) => t.charAt(0).toUpperCase() + t.slice(1)), me = (t, e) => !Object.is(t, e), ar = (t, e, n, r = !1) => {
|
|
893
|
+
Object.defineProperty(t, e, {
|
|
894
|
+
configurable: !0,
|
|
895
|
+
enumerable: !1,
|
|
896
|
+
writable: r,
|
|
897
|
+
value: n
|
|
898
|
+
});
|
|
899
|
+
};
|
|
900
|
+
let Kt;
|
|
901
|
+
const ut = () => Kt || (Kt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
902
|
+
function At(t) {
|
|
903
|
+
if (V(t)) {
|
|
904
|
+
const e = {};
|
|
905
|
+
for (let n = 0; n < t.length; n++) {
|
|
906
|
+
const r = t[n], o = ue(r) ? dr(r) : At(r);
|
|
907
|
+
if (o)
|
|
908
|
+
for (const i in o)
|
|
909
|
+
e[i] = o[i];
|
|
910
|
+
}
|
|
911
|
+
return e;
|
|
912
|
+
} else if (ue(t) || B(t))
|
|
913
|
+
return t;
|
|
914
|
+
}
|
|
915
|
+
const lr = /;(?![^(]*\))/g, ur = /:([^]+)/, fr = /\/\*[^]*?\*\//g;
|
|
916
|
+
function dr(t) {
|
|
917
|
+
const e = {};
|
|
918
|
+
return t.replace(fr, "").split(lr).forEach((n) => {
|
|
919
|
+
if (n) {
|
|
920
|
+
const r = n.split(ur);
|
|
921
|
+
r.length > 1 && (e[r[0].trim()] = r[1].trim());
|
|
922
|
+
}
|
|
923
|
+
}), e;
|
|
924
|
+
}
|
|
925
|
+
function Ut(t) {
|
|
926
|
+
let e = "";
|
|
927
|
+
if (ue(t))
|
|
928
|
+
e = t;
|
|
929
|
+
else if (V(t))
|
|
930
|
+
for (let n = 0; n < t.length; n++) {
|
|
931
|
+
const r = Ut(t[n]);
|
|
932
|
+
r && (e += r + " ");
|
|
933
|
+
}
|
|
934
|
+
else if (B(t))
|
|
935
|
+
for (const n in t)
|
|
936
|
+
t[n] && (e += n + " ");
|
|
937
|
+
return e.trim();
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* @vue/reactivity v3.5.13
|
|
941
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
942
|
+
* @license MIT
|
|
943
|
+
**/
|
|
944
|
+
function ee(t, ...e) {
|
|
945
|
+
console.warn(`[Vue warn] ${t}`, ...e);
|
|
946
|
+
}
|
|
947
|
+
let F;
|
|
948
|
+
class pr {
|
|
949
|
+
constructor(e = !1) {
|
|
950
|
+
this.detached = e, this._active = !0, this.effects = [], this.cleanups = [], this._isPaused = !1, this.parent = F, !e && F && (this.index = (F.scopes || (F.scopes = [])).push(
|
|
951
|
+
this
|
|
952
|
+
) - 1);
|
|
953
|
+
}
|
|
954
|
+
get active() {
|
|
955
|
+
return this._active;
|
|
956
|
+
}
|
|
957
|
+
pause() {
|
|
958
|
+
if (this._active) {
|
|
959
|
+
this._isPaused = !0;
|
|
960
|
+
let e, n;
|
|
961
|
+
if (this.scopes)
|
|
962
|
+
for (e = 0, n = this.scopes.length; e < n; e++)
|
|
963
|
+
this.scopes[e].pause();
|
|
964
|
+
for (e = 0, n = this.effects.length; e < n; e++)
|
|
965
|
+
this.effects[e].pause();
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Resumes the effect scope, including all child scopes and effects.
|
|
970
|
+
*/
|
|
971
|
+
resume() {
|
|
972
|
+
if (this._active && this._isPaused) {
|
|
973
|
+
this._isPaused = !1;
|
|
974
|
+
let e, n;
|
|
975
|
+
if (this.scopes)
|
|
976
|
+
for (e = 0, n = this.scopes.length; e < n; e++)
|
|
977
|
+
this.scopes[e].resume();
|
|
978
|
+
for (e = 0, n = this.effects.length; e < n; e++)
|
|
979
|
+
this.effects[e].resume();
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
run(e) {
|
|
983
|
+
if (this._active) {
|
|
984
|
+
const n = F;
|
|
985
|
+
try {
|
|
986
|
+
return F = this, e();
|
|
987
|
+
} finally {
|
|
988
|
+
F = n;
|
|
989
|
+
}
|
|
990
|
+
} else process.env.NODE_ENV !== "production" && ee("cannot run an inactive effect scope.");
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* This should only be called on non-detached scopes
|
|
994
|
+
* @internal
|
|
995
|
+
*/
|
|
996
|
+
on() {
|
|
997
|
+
F = this;
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* This should only be called on non-detached scopes
|
|
1001
|
+
* @internal
|
|
1002
|
+
*/
|
|
1003
|
+
off() {
|
|
1004
|
+
F = this.parent;
|
|
1005
|
+
}
|
|
1006
|
+
stop(e) {
|
|
1007
|
+
if (this._active) {
|
|
1008
|
+
this._active = !1;
|
|
1009
|
+
let n, r;
|
|
1010
|
+
for (n = 0, r = this.effects.length; n < r; n++)
|
|
1011
|
+
this.effects[n].stop();
|
|
1012
|
+
for (this.effects.length = 0, n = 0, r = this.cleanups.length; n < r; n++)
|
|
1013
|
+
this.cleanups[n]();
|
|
1014
|
+
if (this.cleanups.length = 0, this.scopes) {
|
|
1015
|
+
for (n = 0, r = this.scopes.length; n < r; n++)
|
|
1016
|
+
this.scopes[n].stop(!0);
|
|
1017
|
+
this.scopes.length = 0;
|
|
1018
|
+
}
|
|
1019
|
+
if (!this.detached && this.parent && !e) {
|
|
1020
|
+
const o = this.parent.scopes.pop();
|
|
1021
|
+
o && o !== this && (this.parent.scopes[this.index] = o, o.index = this.index);
|
|
1022
|
+
}
|
|
1023
|
+
this.parent = void 0;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
function hr(t) {
|
|
1028
|
+
return new pr(t);
|
|
1029
|
+
}
|
|
1030
|
+
function nn() {
|
|
1031
|
+
return F;
|
|
1032
|
+
}
|
|
1033
|
+
function gr(t, e = !1) {
|
|
1034
|
+
F ? F.cleanups.push(t) : process.env.NODE_ENV !== "production" && !e && ee(
|
|
1035
|
+
"onScopeDispose() is called when there is no active effect scope to be associated with."
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
let x;
|
|
1039
|
+
const vt = /* @__PURE__ */ new WeakSet();
|
|
1040
|
+
class mr {
|
|
1041
|
+
constructor(e) {
|
|
1042
|
+
this.fn = e, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0, F && F.active && F.effects.push(this);
|
|
1043
|
+
}
|
|
1044
|
+
pause() {
|
|
1045
|
+
this.flags |= 64;
|
|
1046
|
+
}
|
|
1047
|
+
resume() {
|
|
1048
|
+
this.flags & 64 && (this.flags &= -65, vt.has(this) && (vt.delete(this), this.trigger()));
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* @internal
|
|
1052
|
+
*/
|
|
1053
|
+
notify() {
|
|
1054
|
+
this.flags & 2 && !(this.flags & 32) || this.flags & 8 || on(this);
|
|
1055
|
+
}
|
|
1056
|
+
run() {
|
|
1057
|
+
if (!(this.flags & 1))
|
|
1058
|
+
return this.fn();
|
|
1059
|
+
this.flags |= 2, Wt(this), sn(this);
|
|
1060
|
+
const e = x, n = ne;
|
|
1061
|
+
x = this, ne = !0;
|
|
1062
|
+
try {
|
|
1063
|
+
return this.fn();
|
|
1064
|
+
} finally {
|
|
1065
|
+
process.env.NODE_ENV !== "production" && x !== this && ee(
|
|
1066
|
+
"Active effect was not restored correctly - this is likely a Vue internal bug."
|
|
1067
|
+
), cn(this), x = e, ne = n, this.flags &= -3;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
stop() {
|
|
1071
|
+
if (this.flags & 1) {
|
|
1072
|
+
for (let e = this.deps; e; e = e.nextDep)
|
|
1073
|
+
Lt(e);
|
|
1074
|
+
this.deps = this.depsTail = void 0, Wt(this), this.onStop && this.onStop(), this.flags &= -2;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
trigger() {
|
|
1078
|
+
this.flags & 64 ? vt.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty();
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* @internal
|
|
1082
|
+
*/
|
|
1083
|
+
runIfDirty() {
|
|
1084
|
+
Nt(this) && this.run();
|
|
1085
|
+
}
|
|
1086
|
+
get dirty() {
|
|
1087
|
+
return Nt(this);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
let rn = 0, Me, je;
|
|
1091
|
+
function on(t, e = !1) {
|
|
1092
|
+
if (t.flags |= 8, e) {
|
|
1093
|
+
t.next = je, je = t;
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
t.next = Me, Me = t;
|
|
1097
|
+
}
|
|
1098
|
+
function Vt() {
|
|
1099
|
+
rn++;
|
|
1100
|
+
}
|
|
1101
|
+
function Pt() {
|
|
1102
|
+
if (--rn > 0)
|
|
1103
|
+
return;
|
|
1104
|
+
if (je) {
|
|
1105
|
+
let e = je;
|
|
1106
|
+
for (je = void 0; e; ) {
|
|
1107
|
+
const n = e.next;
|
|
1108
|
+
e.next = void 0, e.flags &= -9, e = n;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
let t;
|
|
1112
|
+
for (; Me; ) {
|
|
1113
|
+
let e = Me;
|
|
1114
|
+
for (Me = void 0; e; ) {
|
|
1115
|
+
const n = e.next;
|
|
1116
|
+
if (e.next = void 0, e.flags &= -9, e.flags & 1)
|
|
1117
|
+
try {
|
|
1118
|
+
e.trigger();
|
|
1119
|
+
} catch (r) {
|
|
1120
|
+
t || (t = r);
|
|
1121
|
+
}
|
|
1122
|
+
e = n;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
if (t) throw t;
|
|
1126
|
+
}
|
|
1127
|
+
function sn(t) {
|
|
1128
|
+
for (let e = t.deps; e; e = e.nextDep)
|
|
1129
|
+
e.version = -1, e.prevActiveLink = e.dep.activeLink, e.dep.activeLink = e;
|
|
1130
|
+
}
|
|
1131
|
+
function cn(t) {
|
|
1132
|
+
let e, n = t.depsTail, r = n;
|
|
1133
|
+
for (; r; ) {
|
|
1134
|
+
const o = r.prevDep;
|
|
1135
|
+
r.version === -1 ? (r === n && (n = o), Lt(r), vr(r)) : e = r, r.dep.activeLink = r.prevActiveLink, r.prevActiveLink = void 0, r = o;
|
|
1136
|
+
}
|
|
1137
|
+
t.deps = e, t.depsTail = n;
|
|
1138
|
+
}
|
|
1139
|
+
function Nt(t) {
|
|
1140
|
+
for (let e = t.deps; e; e = e.nextDep)
|
|
1141
|
+
if (e.dep.version !== e.version || e.dep.computed && (an(e.dep.computed) || e.dep.version !== e.version))
|
|
1142
|
+
return !0;
|
|
1143
|
+
return !!t._dirty;
|
|
1144
|
+
}
|
|
1145
|
+
function an(t) {
|
|
1146
|
+
if (t.flags & 4 && !(t.flags & 16) || (t.flags &= -17, t.globalVersion === Fe))
|
|
1147
|
+
return;
|
|
1148
|
+
t.globalVersion = Fe;
|
|
1149
|
+
const e = t.dep;
|
|
1150
|
+
if (t.flags |= 2, e.version > 0 && !t.isSSR && t.deps && !Nt(t)) {
|
|
1151
|
+
t.flags &= -3;
|
|
1152
|
+
return;
|
|
1153
|
+
}
|
|
1154
|
+
const n = x, r = ne;
|
|
1155
|
+
x = t, ne = !0;
|
|
1156
|
+
try {
|
|
1157
|
+
sn(t);
|
|
1158
|
+
const o = t.fn(t._value);
|
|
1159
|
+
(e.version === 0 || me(o, t._value)) && (t._value = o, e.version++);
|
|
1160
|
+
} catch (o) {
|
|
1161
|
+
throw e.version++, o;
|
|
1162
|
+
} finally {
|
|
1163
|
+
x = n, ne = r, cn(t), t.flags &= -3;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
function Lt(t, e = !1) {
|
|
1167
|
+
const { dep: n, prevSub: r, nextSub: o } = t;
|
|
1168
|
+
if (r && (r.nextSub = o, t.prevSub = void 0), o && (o.prevSub = r, t.nextSub = void 0), process.env.NODE_ENV !== "production" && n.subsHead === t && (n.subsHead = o), n.subs === t && (n.subs = r, !r && n.computed)) {
|
|
1169
|
+
n.computed.flags &= -5;
|
|
1170
|
+
for (let i = n.computed.deps; i; i = i.nextDep)
|
|
1171
|
+
Lt(i, !0);
|
|
1172
|
+
}
|
|
1173
|
+
!e && !--n.sc && n.map && n.map.delete(n.key);
|
|
1174
|
+
}
|
|
1175
|
+
function vr(t) {
|
|
1176
|
+
const { prevDep: e, nextDep: n } = t;
|
|
1177
|
+
e && (e.nextDep = n, t.prevDep = void 0), n && (n.prevDep = e, t.nextDep = void 0);
|
|
1178
|
+
}
|
|
1179
|
+
let ne = !0;
|
|
1180
|
+
const ln = [];
|
|
1181
|
+
function ft() {
|
|
1182
|
+
ln.push(ne), ne = !1;
|
|
1183
|
+
}
|
|
1184
|
+
function dt() {
|
|
1185
|
+
const t = ln.pop();
|
|
1186
|
+
ne = t === void 0 ? !0 : t;
|
|
1187
|
+
}
|
|
1188
|
+
function Wt(t) {
|
|
1189
|
+
const { cleanup: e } = t;
|
|
1190
|
+
if (t.cleanup = void 0, e) {
|
|
1191
|
+
const n = x;
|
|
1192
|
+
x = void 0;
|
|
1193
|
+
try {
|
|
1194
|
+
e();
|
|
1195
|
+
} finally {
|
|
1196
|
+
x = n;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
let Fe = 0;
|
|
1201
|
+
class _r {
|
|
1202
|
+
constructor(e, n) {
|
|
1203
|
+
this.sub = e, this.dep = n, this.version = n.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
class Mt {
|
|
1207
|
+
constructor(e) {
|
|
1208
|
+
this.computed = e, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, process.env.NODE_ENV !== "production" && (this.subsHead = void 0);
|
|
1209
|
+
}
|
|
1210
|
+
track(e) {
|
|
1211
|
+
if (!x || !ne || x === this.computed)
|
|
1212
|
+
return;
|
|
1213
|
+
let n = this.activeLink;
|
|
1214
|
+
if (n === void 0 || n.sub !== x)
|
|
1215
|
+
n = this.activeLink = new _r(x, this), x.deps ? (n.prevDep = x.depsTail, x.depsTail.nextDep = n, x.depsTail = n) : x.deps = x.depsTail = n, un(n);
|
|
1216
|
+
else if (n.version === -1 && (n.version = this.version, n.nextDep)) {
|
|
1217
|
+
const r = n.nextDep;
|
|
1218
|
+
r.prevDep = n.prevDep, n.prevDep && (n.prevDep.nextDep = r), n.prevDep = x.depsTail, n.nextDep = void 0, x.depsTail.nextDep = n, x.depsTail = n, x.deps === n && (x.deps = r);
|
|
1219
|
+
}
|
|
1220
|
+
return process.env.NODE_ENV !== "production" && x.onTrack && x.onTrack(
|
|
1221
|
+
_e(
|
|
1222
|
+
{
|
|
1223
|
+
effect: x
|
|
1224
|
+
},
|
|
1225
|
+
e
|
|
1226
|
+
)
|
|
1227
|
+
), n;
|
|
1228
|
+
}
|
|
1229
|
+
trigger(e) {
|
|
1230
|
+
this.version++, Fe++, this.notify(e);
|
|
1231
|
+
}
|
|
1232
|
+
notify(e) {
|
|
1233
|
+
Vt();
|
|
1234
|
+
try {
|
|
1235
|
+
if (process.env.NODE_ENV !== "production")
|
|
1236
|
+
for (let n = this.subsHead; n; n = n.nextSub)
|
|
1237
|
+
n.sub.onTrigger && !(n.sub.flags & 8) && n.sub.onTrigger(
|
|
1238
|
+
_e(
|
|
1239
|
+
{
|
|
1240
|
+
effect: n.sub
|
|
1241
|
+
},
|
|
1242
|
+
e
|
|
1243
|
+
)
|
|
1244
|
+
);
|
|
1245
|
+
for (let n = this.subs; n; n = n.prevSub)
|
|
1246
|
+
n.sub.notify() && n.sub.dep.notify();
|
|
1247
|
+
} finally {
|
|
1248
|
+
Pt();
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
function un(t) {
|
|
1253
|
+
if (t.dep.sc++, t.sub.flags & 4) {
|
|
1254
|
+
const e = t.dep.computed;
|
|
1255
|
+
if (e && !t.dep.subs) {
|
|
1256
|
+
e.flags |= 20;
|
|
1257
|
+
for (let r = e.deps; r; r = r.nextDep)
|
|
1258
|
+
un(r);
|
|
1259
|
+
}
|
|
1260
|
+
const n = t.dep.subs;
|
|
1261
|
+
n !== t && (t.prevSub = n, n && (n.nextSub = t)), process.env.NODE_ENV !== "production" && t.dep.subsHead === void 0 && (t.dep.subsHead = t), t.dep.subs = t;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
const tt = /* @__PURE__ */ new WeakMap(), be = Symbol(
|
|
1265
|
+
process.env.NODE_ENV !== "production" ? "Object iterate" : ""
|
|
1266
|
+
), Tt = Symbol(
|
|
1267
|
+
process.env.NODE_ENV !== "production" ? "Map keys iterate" : ""
|
|
1268
|
+
), Ke = Symbol(
|
|
1269
|
+
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
1270
|
+
);
|
|
1271
|
+
function q(t, e, n) {
|
|
1272
|
+
if (ne && x) {
|
|
1273
|
+
let r = tt.get(t);
|
|
1274
|
+
r || tt.set(t, r = /* @__PURE__ */ new Map());
|
|
1275
|
+
let o = r.get(n);
|
|
1276
|
+
o || (r.set(n, o = new Mt()), o.map = r, o.key = n), process.env.NODE_ENV !== "production" ? o.track({
|
|
1277
|
+
target: t,
|
|
1278
|
+
type: e,
|
|
1279
|
+
key: n
|
|
1280
|
+
}) : o.track();
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
function he(t, e, n, r, o, i) {
|
|
1284
|
+
const c = tt.get(t);
|
|
1285
|
+
if (!c) {
|
|
1286
|
+
Fe++;
|
|
1287
|
+
return;
|
|
1288
|
+
}
|
|
1289
|
+
const a = (p) => {
|
|
1290
|
+
p && (process.env.NODE_ENV !== "production" ? p.trigger({
|
|
1291
|
+
target: t,
|
|
1292
|
+
type: e,
|
|
1293
|
+
key: n,
|
|
1294
|
+
newValue: r,
|
|
1295
|
+
oldValue: o,
|
|
1296
|
+
oldTarget: i
|
|
1297
|
+
}) : p.trigger());
|
|
1298
|
+
};
|
|
1299
|
+
if (Vt(), e === "clear")
|
|
1300
|
+
c.forEach(a);
|
|
1301
|
+
else {
|
|
1302
|
+
const p = V(t), E = p && Dt(n);
|
|
1303
|
+
if (p && n === "length") {
|
|
1304
|
+
const k = Number(r);
|
|
1305
|
+
c.forEach((u, y) => {
|
|
1306
|
+
(y === "length" || y === Ke || !Ye(y) && y >= k) && a(u);
|
|
1307
|
+
});
|
|
1308
|
+
} else
|
|
1309
|
+
switch ((n !== void 0 || c.has(void 0)) && a(c.get(n)), E && a(c.get(Ke)), e) {
|
|
1310
|
+
case "add":
|
|
1311
|
+
p ? E && a(c.get("length")) : (a(c.get(be)), Ce(t) && a(c.get(Tt)));
|
|
1312
|
+
break;
|
|
1313
|
+
case "delete":
|
|
1314
|
+
p || (a(c.get(be)), Ce(t) && a(c.get(Tt)));
|
|
1315
|
+
break;
|
|
1316
|
+
case "set":
|
|
1317
|
+
Ce(t) && a(c.get(be));
|
|
1318
|
+
break;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
Pt();
|
|
1322
|
+
}
|
|
1323
|
+
function yr(t, e) {
|
|
1324
|
+
const n = tt.get(t);
|
|
1325
|
+
return n && n.get(e);
|
|
1326
|
+
}
|
|
1327
|
+
function Ne(t) {
|
|
1328
|
+
const e = R(t);
|
|
1329
|
+
return e === t ? e : (q(e, "iterate", Ke), G(t) ? e : e.map(K));
|
|
1330
|
+
}
|
|
1331
|
+
function jt(t) {
|
|
1332
|
+
return q(t = R(t), "iterate", Ke), t;
|
|
1333
|
+
}
|
|
1334
|
+
const wr = {
|
|
1335
|
+
__proto__: null,
|
|
1336
|
+
[Symbol.iterator]() {
|
|
1337
|
+
return _t(this, Symbol.iterator, K);
|
|
1338
|
+
},
|
|
1339
|
+
concat(...t) {
|
|
1340
|
+
return Ne(this).concat(
|
|
1341
|
+
...t.map((e) => V(e) ? Ne(e) : e)
|
|
1342
|
+
);
|
|
1343
|
+
},
|
|
1344
|
+
entries() {
|
|
1345
|
+
return _t(this, "entries", (t) => (t[1] = K(t[1]), t));
|
|
1346
|
+
},
|
|
1347
|
+
every(t, e) {
|
|
1348
|
+
return ae(this, "every", t, e, void 0, arguments);
|
|
1349
|
+
},
|
|
1350
|
+
filter(t, e) {
|
|
1351
|
+
return ae(this, "filter", t, e, (n) => n.map(K), arguments);
|
|
1352
|
+
},
|
|
1353
|
+
find(t, e) {
|
|
1354
|
+
return ae(this, "find", t, e, K, arguments);
|
|
1355
|
+
},
|
|
1356
|
+
findIndex(t, e) {
|
|
1357
|
+
return ae(this, "findIndex", t, e, void 0, arguments);
|
|
1358
|
+
},
|
|
1359
|
+
findLast(t, e) {
|
|
1360
|
+
return ae(this, "findLast", t, e, K, arguments);
|
|
1361
|
+
},
|
|
1362
|
+
findLastIndex(t, e) {
|
|
1363
|
+
return ae(this, "findLastIndex", t, e, void 0, arguments);
|
|
1364
|
+
},
|
|
1365
|
+
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
1366
|
+
forEach(t, e) {
|
|
1367
|
+
return ae(this, "forEach", t, e, void 0, arguments);
|
|
1368
|
+
},
|
|
1369
|
+
includes(...t) {
|
|
1370
|
+
return yt(this, "includes", t);
|
|
1371
|
+
},
|
|
1372
|
+
indexOf(...t) {
|
|
1373
|
+
return yt(this, "indexOf", t);
|
|
1374
|
+
},
|
|
1375
|
+
join(t) {
|
|
1376
|
+
return Ne(this).join(t);
|
|
1377
|
+
},
|
|
1378
|
+
// keys() iterator only reads `length`, no optimisation required
|
|
1379
|
+
lastIndexOf(...t) {
|
|
1380
|
+
return yt(this, "lastIndexOf", t);
|
|
1381
|
+
},
|
|
1382
|
+
map(t, e) {
|
|
1383
|
+
return ae(this, "map", t, e, void 0, arguments);
|
|
1384
|
+
},
|
|
1385
|
+
pop() {
|
|
1386
|
+
return Ue(this, "pop");
|
|
1387
|
+
},
|
|
1388
|
+
push(...t) {
|
|
1389
|
+
return Ue(this, "push", t);
|
|
1390
|
+
},
|
|
1391
|
+
reduce(t, ...e) {
|
|
1392
|
+
return zt(this, "reduce", t, e);
|
|
1393
|
+
},
|
|
1394
|
+
reduceRight(t, ...e) {
|
|
1395
|
+
return zt(this, "reduceRight", t, e);
|
|
1396
|
+
},
|
|
1397
|
+
shift() {
|
|
1398
|
+
return Ue(this, "shift");
|
|
1399
|
+
},
|
|
1400
|
+
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
1401
|
+
some(t, e) {
|
|
1402
|
+
return ae(this, "some", t, e, void 0, arguments);
|
|
1403
|
+
},
|
|
1404
|
+
splice(...t) {
|
|
1405
|
+
return Ue(this, "splice", t);
|
|
1406
|
+
},
|
|
1407
|
+
toReversed() {
|
|
1408
|
+
return Ne(this).toReversed();
|
|
1409
|
+
},
|
|
1410
|
+
toSorted(t) {
|
|
1411
|
+
return Ne(this).toSorted(t);
|
|
1412
|
+
},
|
|
1413
|
+
toSpliced(...t) {
|
|
1414
|
+
return Ne(this).toSpliced(...t);
|
|
1415
|
+
},
|
|
1416
|
+
unshift(...t) {
|
|
1417
|
+
return Ue(this, "unshift", t);
|
|
1418
|
+
},
|
|
1419
|
+
values() {
|
|
1420
|
+
return _t(this, "values", K);
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
function _t(t, e, n) {
|
|
1424
|
+
const r = jt(t), o = r[e]();
|
|
1425
|
+
return r !== t && !G(t) && (o._next = o.next, o.next = () => {
|
|
1426
|
+
const i = o._next();
|
|
1427
|
+
return i.value && (i.value = n(i.value)), i;
|
|
1428
|
+
}), o;
|
|
1429
|
+
}
|
|
1430
|
+
const br = Array.prototype;
|
|
1431
|
+
function ae(t, e, n, r, o, i) {
|
|
1432
|
+
const c = jt(t), a = c !== t && !G(t), p = c[e];
|
|
1433
|
+
if (p !== br[e]) {
|
|
1434
|
+
const u = p.apply(t, i);
|
|
1435
|
+
return a ? K(u) : u;
|
|
1436
|
+
}
|
|
1437
|
+
let E = n;
|
|
1438
|
+
c !== t && (a ? E = function(u, y) {
|
|
1439
|
+
return n.call(this, K(u), y, t);
|
|
1440
|
+
} : n.length > 2 && (E = function(u, y) {
|
|
1441
|
+
return n.call(this, u, y, t);
|
|
1442
|
+
}));
|
|
1443
|
+
const k = p.call(c, E, r);
|
|
1444
|
+
return a && o ? o(k) : k;
|
|
1445
|
+
}
|
|
1446
|
+
function zt(t, e, n, r) {
|
|
1447
|
+
const o = jt(t);
|
|
1448
|
+
let i = n;
|
|
1449
|
+
return o !== t && (G(t) ? n.length > 3 && (i = function(c, a, p) {
|
|
1450
|
+
return n.call(this, c, a, p, t);
|
|
1451
|
+
}) : i = function(c, a, p) {
|
|
1452
|
+
return n.call(this, c, K(a), p, t);
|
|
1453
|
+
}), o[e](i, ...r);
|
|
1454
|
+
}
|
|
1455
|
+
function yt(t, e, n) {
|
|
1456
|
+
const r = R(t);
|
|
1457
|
+
q(r, "iterate", Ke);
|
|
1458
|
+
const o = r[e](...n);
|
|
1459
|
+
return (o === -1 || o === !1) && We(n[0]) ? (n[0] = R(n[0]), r[e](...n)) : o;
|
|
1460
|
+
}
|
|
1461
|
+
function Ue(t, e, n = []) {
|
|
1462
|
+
ft(), Vt();
|
|
1463
|
+
const r = R(t)[e].apply(t, n);
|
|
1464
|
+
return Pt(), dt(), r;
|
|
1465
|
+
}
|
|
1466
|
+
const Er = /* @__PURE__ */ Qn("__proto__,__v_isRef,__isVue"), fn = new Set(
|
|
1467
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(Ye)
|
|
1468
|
+
);
|
|
1469
|
+
function kr(t) {
|
|
1470
|
+
Ye(t) || (t = String(t));
|
|
1471
|
+
const e = R(this);
|
|
1472
|
+
return q(e, "has", t), e.hasOwnProperty(t);
|
|
1473
|
+
}
|
|
1474
|
+
class dn {
|
|
1475
|
+
constructor(e = !1, n = !1) {
|
|
1476
|
+
this._isReadonly = e, this._isShallow = n;
|
|
1477
|
+
}
|
|
1478
|
+
get(e, n, r) {
|
|
1479
|
+
if (n === "__v_skip") return e.__v_skip;
|
|
1480
|
+
const o = this._isReadonly, i = this._isShallow;
|
|
1481
|
+
if (n === "__v_isReactive")
|
|
1482
|
+
return !o;
|
|
1483
|
+
if (n === "__v_isReadonly")
|
|
1484
|
+
return o;
|
|
1485
|
+
if (n === "__v_isShallow")
|
|
1486
|
+
return i;
|
|
1487
|
+
if (n === "__v_raw")
|
|
1488
|
+
return r === (o ? i ? Ar : gn : i ? Dr : hn).get(e) || // receiver is not the reactive proxy, but has the same prototype
|
|
1489
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
1490
|
+
Object.getPrototypeOf(e) === Object.getPrototypeOf(r) ? e : void 0;
|
|
1491
|
+
const c = V(e);
|
|
1492
|
+
if (!o) {
|
|
1493
|
+
let p;
|
|
1494
|
+
if (c && (p = wr[n]))
|
|
1495
|
+
return p;
|
|
1496
|
+
if (n === "hasOwnProperty")
|
|
1497
|
+
return kr;
|
|
1498
|
+
}
|
|
1499
|
+
const a = Reflect.get(
|
|
1500
|
+
e,
|
|
1501
|
+
n,
|
|
1502
|
+
// if this is a proxy wrapping a ref, return methods using the raw ref
|
|
1503
|
+
// as receiver so that we don't have to call `toRaw` on the ref in all
|
|
1504
|
+
// its class methods
|
|
1505
|
+
P(e) ? e : r
|
|
1506
|
+
);
|
|
1507
|
+
return (Ye(n) ? fn.has(n) : Er(n)) || (o || q(e, "get", n), i) ? a : P(a) ? c && Dt(n) ? a : a.value : B(a) ? o ? mn(a) : Ht(a) : a;
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
class Sr extends dn {
|
|
1511
|
+
constructor(e = !1) {
|
|
1512
|
+
super(!1, e);
|
|
1513
|
+
}
|
|
1514
|
+
set(e, n, r, o) {
|
|
1515
|
+
let i = e[n];
|
|
1516
|
+
if (!this._isShallow) {
|
|
1517
|
+
const p = fe(i);
|
|
1518
|
+
if (!G(r) && !fe(r) && (i = R(i), r = R(r)), !V(e) && P(i) && !P(r))
|
|
1519
|
+
return p ? !1 : (i.value = r, !0);
|
|
1520
|
+
}
|
|
1521
|
+
const c = V(e) && Dt(n) ? Number(n) < e.length : et(e, n), a = Reflect.set(
|
|
1522
|
+
e,
|
|
1523
|
+
n,
|
|
1524
|
+
r,
|
|
1525
|
+
P(e) ? e : o
|
|
1526
|
+
);
|
|
1527
|
+
return e === R(o) && (c ? me(r, i) && he(e, "set", n, r, i) : he(e, "add", n, r)), a;
|
|
1528
|
+
}
|
|
1529
|
+
deleteProperty(e, n) {
|
|
1530
|
+
const r = et(e, n), o = e[n], i = Reflect.deleteProperty(e, n);
|
|
1531
|
+
return i && r && he(e, "delete", n, void 0, o), i;
|
|
1532
|
+
}
|
|
1533
|
+
has(e, n) {
|
|
1534
|
+
const r = Reflect.has(e, n);
|
|
1535
|
+
return (!Ye(n) || !fn.has(n)) && q(e, "has", n), r;
|
|
1536
|
+
}
|
|
1537
|
+
ownKeys(e) {
|
|
1538
|
+
return q(
|
|
1539
|
+
e,
|
|
1540
|
+
"iterate",
|
|
1541
|
+
V(e) ? "length" : be
|
|
1542
|
+
), Reflect.ownKeys(e);
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
class Nr extends dn {
|
|
1546
|
+
constructor(e = !1) {
|
|
1547
|
+
super(!0, e);
|
|
1548
|
+
}
|
|
1549
|
+
set(e, n) {
|
|
1550
|
+
return process.env.NODE_ENV !== "production" && ee(
|
|
1551
|
+
`Set operation on key "${String(n)}" failed: target is readonly.`,
|
|
1552
|
+
e
|
|
1553
|
+
), !0;
|
|
1554
|
+
}
|
|
1555
|
+
deleteProperty(e, n) {
|
|
1556
|
+
return process.env.NODE_ENV !== "production" && ee(
|
|
1557
|
+
`Delete operation on key "${String(n)}" failed: target is readonly.`,
|
|
1558
|
+
e
|
|
1559
|
+
), !0;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
const Tr = /* @__PURE__ */ new Sr(), Or = /* @__PURE__ */ new Nr(), Ot = (t) => t, Be = (t) => Reflect.getPrototypeOf(t);
|
|
1563
|
+
function Ir(t, e, n) {
|
|
1564
|
+
return function(...r) {
|
|
1565
|
+
const o = this.__v_raw, i = R(o), c = Ce(i), a = t === "entries" || t === Symbol.iterator && c, p = t === "keys" && c, E = o[t](...r), k = n ? Ot : e ? It : K;
|
|
1566
|
+
return !e && q(
|
|
1567
|
+
i,
|
|
1568
|
+
"iterate",
|
|
1569
|
+
p ? Tt : be
|
|
1570
|
+
), {
|
|
1571
|
+
// iterator protocol
|
|
1572
|
+
next() {
|
|
1573
|
+
const { value: u, done: y } = E.next();
|
|
1574
|
+
return y ? { value: u, done: y } : {
|
|
1575
|
+
value: a ? [k(u[0]), k(u[1])] : k(u),
|
|
1576
|
+
done: y
|
|
1577
|
+
};
|
|
1578
|
+
},
|
|
1579
|
+
// iterable protocol
|
|
1580
|
+
[Symbol.iterator]() {
|
|
1581
|
+
return this;
|
|
1582
|
+
}
|
|
1583
|
+
};
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
function Ge(t) {
|
|
1587
|
+
return function(...e) {
|
|
1588
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1589
|
+
const n = e[0] ? `on key "${e[0]}" ` : "";
|
|
1590
|
+
ee(
|
|
1591
|
+
`${cr(t)} operation ${n}failed: target is readonly.`,
|
|
1592
|
+
R(this)
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
return t === "delete" ? !1 : t === "clear" ? void 0 : this;
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
function Rr(t, e) {
|
|
1599
|
+
const n = {
|
|
1600
|
+
get(o) {
|
|
1601
|
+
const i = this.__v_raw, c = R(i), a = R(o);
|
|
1602
|
+
t || (me(o, a) && q(c, "get", o), q(c, "get", a));
|
|
1603
|
+
const { has: p } = Be(c), E = e ? Ot : t ? It : K;
|
|
1604
|
+
if (p.call(c, o))
|
|
1605
|
+
return E(i.get(o));
|
|
1606
|
+
if (p.call(c, a))
|
|
1607
|
+
return E(i.get(a));
|
|
1608
|
+
i !== c && i.get(o);
|
|
1609
|
+
},
|
|
1610
|
+
get size() {
|
|
1611
|
+
const o = this.__v_raw;
|
|
1612
|
+
return !t && q(R(o), "iterate", be), Reflect.get(o, "size", o);
|
|
1613
|
+
},
|
|
1614
|
+
has(o) {
|
|
1615
|
+
const i = this.__v_raw, c = R(i), a = R(o);
|
|
1616
|
+
return t || (me(o, a) && q(c, "has", o), q(c, "has", a)), o === a ? i.has(o) : i.has(o) || i.has(a);
|
|
1617
|
+
},
|
|
1618
|
+
forEach(o, i) {
|
|
1619
|
+
const c = this, a = c.__v_raw, p = R(a), E = e ? Ot : t ? It : K;
|
|
1620
|
+
return !t && q(p, "iterate", be), a.forEach((k, u) => o.call(i, E(k), E(u), c));
|
|
1621
|
+
}
|
|
1622
|
+
};
|
|
1623
|
+
return _e(
|
|
1624
|
+
n,
|
|
1625
|
+
t ? {
|
|
1626
|
+
add: Ge("add"),
|
|
1627
|
+
set: Ge("set"),
|
|
1628
|
+
delete: Ge("delete"),
|
|
1629
|
+
clear: Ge("clear")
|
|
1630
|
+
} : {
|
|
1631
|
+
add(o) {
|
|
1632
|
+
!e && !G(o) && !fe(o) && (o = R(o));
|
|
1633
|
+
const i = R(this);
|
|
1634
|
+
return Be(i).has.call(i, o) || (i.add(o), he(i, "add", o, o)), this;
|
|
1635
|
+
},
|
|
1636
|
+
set(o, i) {
|
|
1637
|
+
!e && !G(i) && !fe(i) && (i = R(i));
|
|
1638
|
+
const c = R(this), { has: a, get: p } = Be(c);
|
|
1639
|
+
let E = a.call(c, o);
|
|
1640
|
+
E ? process.env.NODE_ENV !== "production" && Jt(c, a, o) : (o = R(o), E = a.call(c, o));
|
|
1641
|
+
const k = p.call(c, o);
|
|
1642
|
+
return c.set(o, i), E ? me(i, k) && he(c, "set", o, i, k) : he(c, "add", o, i), this;
|
|
1643
|
+
},
|
|
1644
|
+
delete(o) {
|
|
1645
|
+
const i = R(this), { has: c, get: a } = Be(i);
|
|
1646
|
+
let p = c.call(i, o);
|
|
1647
|
+
p ? process.env.NODE_ENV !== "production" && Jt(i, c, o) : (o = R(o), p = c.call(i, o));
|
|
1648
|
+
const E = a ? a.call(i, o) : void 0, k = i.delete(o);
|
|
1649
|
+
return p && he(i, "delete", o, void 0, E), k;
|
|
1650
|
+
},
|
|
1651
|
+
clear() {
|
|
1652
|
+
const o = R(this), i = o.size !== 0, c = process.env.NODE_ENV !== "production" ? Ce(o) ? new Map(o) : new Set(o) : void 0, a = o.clear();
|
|
1653
|
+
return i && he(
|
|
1654
|
+
o,
|
|
1655
|
+
"clear",
|
|
1656
|
+
void 0,
|
|
1657
|
+
void 0,
|
|
1658
|
+
c
|
|
1659
|
+
), a;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
), [
|
|
1663
|
+
"keys",
|
|
1664
|
+
"values",
|
|
1665
|
+
"entries",
|
|
1666
|
+
Symbol.iterator
|
|
1667
|
+
].forEach((o) => {
|
|
1668
|
+
n[o] = Ir(o, t, e);
|
|
1669
|
+
}), n;
|
|
1670
|
+
}
|
|
1671
|
+
function pn(t, e) {
|
|
1672
|
+
const n = Rr(t, e);
|
|
1673
|
+
return (r, o, i) => o === "__v_isReactive" ? !t : o === "__v_isReadonly" ? t : o === "__v_raw" ? r : Reflect.get(
|
|
1674
|
+
et(n, o) && o in r ? n : r,
|
|
1675
|
+
o,
|
|
1676
|
+
i
|
|
1677
|
+
);
|
|
1678
|
+
}
|
|
1679
|
+
const Cr = {
|
|
1680
|
+
get: /* @__PURE__ */ pn(!1, !1)
|
|
1681
|
+
}, xr = {
|
|
1682
|
+
get: /* @__PURE__ */ pn(!0, !1)
|
|
1683
|
+
};
|
|
1684
|
+
function Jt(t, e, n) {
|
|
1685
|
+
const r = R(n);
|
|
1686
|
+
if (r !== n && e.call(t, r)) {
|
|
1687
|
+
const o = tn(t);
|
|
1688
|
+
ee(
|
|
1689
|
+
`Reactive ${o} contains both the raw and reactive versions of the same object${o === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
1690
|
+
);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
const hn = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), gn = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap();
|
|
1694
|
+
function Ur(t) {
|
|
1695
|
+
switch (t) {
|
|
1696
|
+
case "Object":
|
|
1697
|
+
case "Array":
|
|
1698
|
+
return 1;
|
|
1699
|
+
case "Map":
|
|
1700
|
+
case "Set":
|
|
1701
|
+
case "WeakMap":
|
|
1702
|
+
case "WeakSet":
|
|
1703
|
+
return 2;
|
|
1704
|
+
default:
|
|
1705
|
+
return 0;
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
function Vr(t) {
|
|
1709
|
+
return t.__v_skip || !Object.isExtensible(t) ? 0 : Ur(tn(t));
|
|
1710
|
+
}
|
|
1711
|
+
function Ht(t) {
|
|
1712
|
+
return fe(t) ? t : vn(
|
|
1713
|
+
t,
|
|
1714
|
+
!1,
|
|
1715
|
+
Tr,
|
|
1716
|
+
Cr,
|
|
1717
|
+
hn
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
function mn(t) {
|
|
1721
|
+
return vn(
|
|
1722
|
+
t,
|
|
1723
|
+
!0,
|
|
1724
|
+
Or,
|
|
1725
|
+
xr,
|
|
1726
|
+
gn
|
|
1727
|
+
);
|
|
1728
|
+
}
|
|
1729
|
+
function vn(t, e, n, r, o) {
|
|
1730
|
+
if (!B(t))
|
|
1731
|
+
return process.env.NODE_ENV !== "production" && ee(
|
|
1732
|
+
`value cannot be made ${e ? "readonly" : "reactive"}: ${String(
|
|
1733
|
+
t
|
|
1734
|
+
)}`
|
|
1735
|
+
), t;
|
|
1736
|
+
if (t.__v_raw && !(e && t.__v_isReactive))
|
|
1737
|
+
return t;
|
|
1738
|
+
const i = o.get(t);
|
|
1739
|
+
if (i)
|
|
1740
|
+
return i;
|
|
1741
|
+
const c = Vr(t);
|
|
1742
|
+
if (c === 0)
|
|
1743
|
+
return t;
|
|
1744
|
+
const a = new Proxy(
|
|
1745
|
+
t,
|
|
1746
|
+
c === 2 ? r : n
|
|
1747
|
+
);
|
|
1748
|
+
return o.set(t, a), a;
|
|
1749
|
+
}
|
|
1750
|
+
function ve(t) {
|
|
1751
|
+
return fe(t) ? ve(t.__v_raw) : !!(t && t.__v_isReactive);
|
|
1752
|
+
}
|
|
1753
|
+
function fe(t) {
|
|
1754
|
+
return !!(t && t.__v_isReadonly);
|
|
1755
|
+
}
|
|
1756
|
+
function G(t) {
|
|
1757
|
+
return !!(t && t.__v_isShallow);
|
|
1758
|
+
}
|
|
1759
|
+
function We(t) {
|
|
1760
|
+
return t ? !!t.__v_raw : !1;
|
|
1761
|
+
}
|
|
1762
|
+
function R(t) {
|
|
1763
|
+
const e = t && t.__v_raw;
|
|
1764
|
+
return e ? R(e) : t;
|
|
1765
|
+
}
|
|
1766
|
+
function Ve(t) {
|
|
1767
|
+
return !et(t, "__v_skip") && Object.isExtensible(t) && ar(t, "__v_skip", !0), t;
|
|
1768
|
+
}
|
|
1769
|
+
const K = (t) => B(t) ? Ht(t) : t, It = (t) => B(t) ? mn(t) : t;
|
|
1770
|
+
function P(t) {
|
|
1771
|
+
return t ? t.__v_isRef === !0 : !1;
|
|
1772
|
+
}
|
|
1773
|
+
function ze(t) {
|
|
1774
|
+
return _n(t, !1);
|
|
1775
|
+
}
|
|
1776
|
+
function Pr(t) {
|
|
1777
|
+
return _n(t, !0);
|
|
1778
|
+
}
|
|
1779
|
+
function _n(t, e) {
|
|
1780
|
+
return P(t) ? t : new Lr(t, e);
|
|
1781
|
+
}
|
|
1782
|
+
class Lr {
|
|
1783
|
+
constructor(e, n) {
|
|
1784
|
+
this.dep = new Mt(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = n ? e : R(e), this._value = n ? e : K(e), this.__v_isShallow = n;
|
|
1785
|
+
}
|
|
1786
|
+
get value() {
|
|
1787
|
+
return process.env.NODE_ENV !== "production" ? this.dep.track({
|
|
1788
|
+
target: this,
|
|
1789
|
+
type: "get",
|
|
1790
|
+
key: "value"
|
|
1791
|
+
}) : this.dep.track(), this._value;
|
|
1792
|
+
}
|
|
1793
|
+
set value(e) {
|
|
1794
|
+
const n = this._rawValue, r = this.__v_isShallow || G(e) || fe(e);
|
|
1795
|
+
e = r ? e : R(e), me(e, n) && (this._rawValue = e, this._value = r ? e : K(e), process.env.NODE_ENV !== "production" ? this.dep.trigger({
|
|
1796
|
+
target: this,
|
|
1797
|
+
type: "set",
|
|
1798
|
+
key: "value",
|
|
1799
|
+
newValue: e,
|
|
1800
|
+
oldValue: n
|
|
1801
|
+
}) : this.dep.trigger());
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
function Yt(t) {
|
|
1805
|
+
process.env.NODE_ENV !== "production" && !We(t) && ee("toRefs() expects a reactive object but received a plain one.");
|
|
1806
|
+
const e = V(t) ? new Array(t.length) : {};
|
|
1807
|
+
for (const n in t)
|
|
1808
|
+
e[n] = yn(t, n);
|
|
1809
|
+
return e;
|
|
1810
|
+
}
|
|
1811
|
+
class Mr {
|
|
1812
|
+
constructor(e, n, r) {
|
|
1813
|
+
this._object = e, this._key = n, this._defaultValue = r, this.__v_isRef = !0, this._value = void 0;
|
|
1814
|
+
}
|
|
1815
|
+
get value() {
|
|
1816
|
+
const e = this._object[this._key];
|
|
1817
|
+
return this._value = e === void 0 ? this._defaultValue : e;
|
|
1818
|
+
}
|
|
1819
|
+
set value(e) {
|
|
1820
|
+
this._object[this._key] = e;
|
|
1821
|
+
}
|
|
1822
|
+
get dep() {
|
|
1823
|
+
return yr(R(this._object), this._key);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
class jr {
|
|
1827
|
+
constructor(e) {
|
|
1828
|
+
this._getter = e, this.__v_isRef = !0, this.__v_isReadonly = !0, this._value = void 0;
|
|
1829
|
+
}
|
|
1830
|
+
get value() {
|
|
1831
|
+
return this._value = this._getter();
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
function wt(t, e, n) {
|
|
1835
|
+
return P(t) ? t : M(t) ? new jr(t) : B(t) && arguments.length > 1 ? yn(t, e, n) : ze(t);
|
|
1836
|
+
}
|
|
1837
|
+
function yn(t, e, n) {
|
|
1838
|
+
const r = t[e];
|
|
1839
|
+
return P(r) ? r : new Mr(t, e, n);
|
|
1840
|
+
}
|
|
1841
|
+
class Hr {
|
|
1842
|
+
constructor(e, n, r) {
|
|
1843
|
+
this.fn = e, this.setter = n, this._value = void 0, this.dep = new Mt(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = Fe - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !n, this.isSSR = r;
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* @internal
|
|
1847
|
+
*/
|
|
1848
|
+
notify() {
|
|
1849
|
+
if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
|
|
1850
|
+
x !== this)
|
|
1851
|
+
return on(this, !0), !0;
|
|
1852
|
+
process.env.NODE_ENV;
|
|
1853
|
+
}
|
|
1854
|
+
get value() {
|
|
1855
|
+
const e = process.env.NODE_ENV !== "production" ? this.dep.track({
|
|
1856
|
+
target: this,
|
|
1857
|
+
type: "get",
|
|
1858
|
+
key: "value"
|
|
1859
|
+
}) : this.dep.track();
|
|
1860
|
+
return an(this), e && (e.version = this.dep.version), this._value;
|
|
1861
|
+
}
|
|
1862
|
+
set value(e) {
|
|
1863
|
+
this.setter ? this.setter(e) : process.env.NODE_ENV !== "production" && ee("Write operation failed: computed value is readonly");
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
function $r(t, e, n = !1) {
|
|
1867
|
+
let r, o;
|
|
1868
|
+
M(t) ? r = t : (r = t.get, o = t.set);
|
|
1869
|
+
const i = new Hr(r, o, n);
|
|
1870
|
+
return process.env.NODE_ENV, i;
|
|
1871
|
+
}
|
|
1872
|
+
const Xe = {}, nt = /* @__PURE__ */ new WeakMap();
|
|
1873
|
+
let we;
|
|
1874
|
+
function Fr(t, e = !1, n = we) {
|
|
1875
|
+
if (n) {
|
|
1876
|
+
let r = nt.get(n);
|
|
1877
|
+
r || nt.set(n, r = []), r.push(t);
|
|
1878
|
+
} else process.env.NODE_ENV !== "production" && !e && ee(
|
|
1879
|
+
"onWatcherCleanup() was called when there was no active watcher to associate with."
|
|
1880
|
+
);
|
|
1881
|
+
}
|
|
1882
|
+
function Kr(t, e, n = $e) {
|
|
1883
|
+
const { immediate: r, deep: o, once: i, scheduler: c, augmentJob: a, call: p } = n, E = (T) => {
|
|
1884
|
+
(n.onWarn || ee)(
|
|
1885
|
+
"Invalid watch source: ",
|
|
1886
|
+
T,
|
|
1887
|
+
"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."
|
|
1888
|
+
);
|
|
1889
|
+
}, k = (T) => o ? T : G(T) || o === !1 || o === 0 ? ge(T, 1) : ge(T);
|
|
1890
|
+
let u, y, S, C, L = !1, j = !1;
|
|
1891
|
+
if (P(t) ? (y = () => t.value, L = G(t)) : ve(t) ? (y = () => k(t), L = !0) : V(t) ? (j = !0, L = t.some((T) => ve(T) || G(T)), y = () => t.map((T) => {
|
|
1892
|
+
if (P(T))
|
|
1893
|
+
return T.value;
|
|
1894
|
+
if (ve(T))
|
|
1895
|
+
return k(T);
|
|
1896
|
+
if (M(T))
|
|
1897
|
+
return p ? p(T, 2) : T();
|
|
1898
|
+
process.env.NODE_ENV !== "production" && E(T);
|
|
1899
|
+
})) : M(t) ? e ? y = p ? () => p(t, 2) : t : y = () => {
|
|
1900
|
+
if (S) {
|
|
1901
|
+
ft();
|
|
1902
|
+
try {
|
|
1903
|
+
S();
|
|
1904
|
+
} finally {
|
|
1905
|
+
dt();
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
const T = we;
|
|
1909
|
+
we = u;
|
|
1910
|
+
try {
|
|
1911
|
+
return p ? p(t, 3, [C]) : t(C);
|
|
1912
|
+
} finally {
|
|
1913
|
+
we = T;
|
|
1914
|
+
}
|
|
1915
|
+
} : (y = Re, process.env.NODE_ENV !== "production" && E(t)), e && o) {
|
|
1916
|
+
const T = y, H = o === !0 ? 1 / 0 : o;
|
|
1917
|
+
y = () => ge(T(), H);
|
|
1918
|
+
}
|
|
1919
|
+
const de = nn(), te = () => {
|
|
1920
|
+
u.stop(), de && de.active && er(de.effects, u);
|
|
1921
|
+
};
|
|
1922
|
+
if (i && e) {
|
|
1923
|
+
const T = e;
|
|
1924
|
+
e = (...H) => {
|
|
1925
|
+
T(...H), te();
|
|
1926
|
+
};
|
|
1927
|
+
}
|
|
1928
|
+
let z = j ? new Array(t.length).fill(Xe) : Xe;
|
|
1929
|
+
const X = (T) => {
|
|
1930
|
+
if (!(!(u.flags & 1) || !u.dirty && !T))
|
|
1931
|
+
if (e) {
|
|
1932
|
+
const H = u.run();
|
|
1933
|
+
if (o || L || (j ? H.some((N, A) => me(N, z[A])) : me(H, z))) {
|
|
1934
|
+
S && S();
|
|
1935
|
+
const N = we;
|
|
1936
|
+
we = u;
|
|
1937
|
+
try {
|
|
1938
|
+
const A = [
|
|
1939
|
+
H,
|
|
1940
|
+
// pass undefined as the old value when it's changed for the first time
|
|
1941
|
+
z === Xe ? void 0 : j && z[0] === Xe ? [] : z,
|
|
1942
|
+
C
|
|
1943
|
+
];
|
|
1944
|
+
p ? p(e, 3, A) : (
|
|
1945
|
+
// @ts-expect-error
|
|
1946
|
+
e(...A)
|
|
1947
|
+
), z = H;
|
|
1948
|
+
} finally {
|
|
1949
|
+
we = N;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
} else
|
|
1953
|
+
u.run();
|
|
1954
|
+
};
|
|
1955
|
+
return a && a(X), u = new mr(y), u.scheduler = c ? () => c(X, !1) : X, C = (T) => Fr(T, !1, u), S = u.onStop = () => {
|
|
1956
|
+
const T = nt.get(u);
|
|
1957
|
+
if (T) {
|
|
1958
|
+
if (p)
|
|
1959
|
+
p(T, 4);
|
|
1960
|
+
else
|
|
1961
|
+
for (const H of T) H();
|
|
1962
|
+
nt.delete(u);
|
|
1963
|
+
}
|
|
1964
|
+
}, process.env.NODE_ENV !== "production" && (u.onTrack = n.onTrack, u.onTrigger = n.onTrigger), e ? r ? X(!0) : z = u.run() : c ? c(X.bind(null, !0), !0) : u.run(), te.pause = u.pause.bind(u), te.resume = u.resume.bind(u), te.stop = te, te;
|
|
1965
|
+
}
|
|
1966
|
+
function ge(t, e = 1 / 0, n) {
|
|
1967
|
+
if (e <= 0 || !B(t) || t.__v_skip || (n = n || /* @__PURE__ */ new Set(), n.has(t)))
|
|
1968
|
+
return t;
|
|
1969
|
+
if (n.add(t), e--, P(t))
|
|
1970
|
+
ge(t.value, e, n);
|
|
1971
|
+
else if (V(t))
|
|
1972
|
+
for (let r = 0; r < t.length; r++)
|
|
1973
|
+
ge(t[r], e, n);
|
|
1974
|
+
else if (nr(t) || Ce(t))
|
|
1975
|
+
t.forEach((r) => {
|
|
1976
|
+
ge(r, e, n);
|
|
1977
|
+
});
|
|
1978
|
+
else if (sr(t)) {
|
|
1979
|
+
for (const r in t)
|
|
1980
|
+
ge(t[r], e, n);
|
|
1981
|
+
for (const r of Object.getOwnPropertySymbols(t))
|
|
1982
|
+
Object.prototype.propertyIsEnumerable.call(t, r) && ge(t[r], e, n);
|
|
1983
|
+
}
|
|
1984
|
+
return t;
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* @vue/runtime-core v3.5.13
|
|
1988
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1989
|
+
* @license MIT
|
|
1990
|
+
**/
|
|
1991
|
+
const Ee = [];
|
|
1992
|
+
function Wr(t) {
|
|
1993
|
+
Ee.push(t);
|
|
1994
|
+
}
|
|
1995
|
+
function zr() {
|
|
1996
|
+
Ee.pop();
|
|
1997
|
+
}
|
|
1998
|
+
let bt = !1;
|
|
1999
|
+
function W(t, ...e) {
|
|
2000
|
+
if (bt) return;
|
|
2001
|
+
bt = !0, ft();
|
|
2002
|
+
const n = Ee.length ? Ee[Ee.length - 1].component : null, r = n && n.appContext.config.warnHandler, o = Jr();
|
|
2003
|
+
if (r)
|
|
2004
|
+
pt(
|
|
2005
|
+
r,
|
|
2006
|
+
n,
|
|
2007
|
+
11,
|
|
2008
|
+
[
|
|
2009
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
2010
|
+
t + e.map((i) => {
|
|
2011
|
+
var c, a;
|
|
2012
|
+
return (a = (c = i.toString) == null ? void 0 : c.call(i)) != null ? a : JSON.stringify(i);
|
|
2013
|
+
}).join(""),
|
|
2014
|
+
n && n.proxy,
|
|
2015
|
+
o.map(
|
|
2016
|
+
({ vnode: i }) => `at <${$n(n, i.type)}>`
|
|
2017
|
+
).join(`
|
|
2018
|
+
`),
|
|
2019
|
+
o
|
|
2020
|
+
]
|
|
2021
|
+
);
|
|
2022
|
+
else {
|
|
2023
|
+
const i = [`[Vue warn]: ${t}`, ...e];
|
|
2024
|
+
o.length && i.push(`
|
|
2025
|
+
`, ...Yr(o)), console.warn(...i);
|
|
2026
|
+
}
|
|
2027
|
+
dt(), bt = !1;
|
|
2028
|
+
}
|
|
2029
|
+
function Jr() {
|
|
2030
|
+
let t = Ee[Ee.length - 1];
|
|
2031
|
+
if (!t)
|
|
2032
|
+
return [];
|
|
2033
|
+
const e = [];
|
|
2034
|
+
for (; t; ) {
|
|
2035
|
+
const n = e[0];
|
|
2036
|
+
n && n.vnode === t ? n.recurseCount++ : e.push({
|
|
2037
|
+
vnode: t,
|
|
2038
|
+
recurseCount: 0
|
|
2039
|
+
});
|
|
2040
|
+
const r = t.component && t.component.parent;
|
|
2041
|
+
t = r && r.vnode;
|
|
2042
|
+
}
|
|
2043
|
+
return e;
|
|
2044
|
+
}
|
|
2045
|
+
function Yr(t) {
|
|
2046
|
+
const e = [];
|
|
2047
|
+
return t.forEach((n, r) => {
|
|
2048
|
+
e.push(...r === 0 ? [] : [`
|
|
2049
|
+
`], ...qr(n));
|
|
2050
|
+
}), e;
|
|
2051
|
+
}
|
|
2052
|
+
function qr({ vnode: t, recurseCount: e }) {
|
|
2053
|
+
const n = e > 0 ? `... (${e} recursive calls)` : "", r = t.component ? t.component.parent == null : !1, o = ` at <${$n(
|
|
2054
|
+
t.component,
|
|
2055
|
+
t.type,
|
|
2056
|
+
r
|
|
2057
|
+
)}`, i = ">" + n;
|
|
2058
|
+
return t.props ? [o, ...Br(t.props), i] : [o + i];
|
|
2059
|
+
}
|
|
2060
|
+
function Br(t) {
|
|
2061
|
+
const e = [], n = Object.keys(t);
|
|
2062
|
+
return n.slice(0, 3).forEach((r) => {
|
|
2063
|
+
e.push(...wn(r, t[r]));
|
|
2064
|
+
}), n.length > 3 && e.push(" ..."), e;
|
|
2065
|
+
}
|
|
2066
|
+
function wn(t, e, n) {
|
|
2067
|
+
return ue(e) ? (e = JSON.stringify(e), n ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? n ? e : [`${t}=${e}`] : P(e) ? (e = wn(t, R(e.value), !0), n ? e : [`${t}=Ref<`, e, ">"]) : M(e) ? [`${t}=fn${e.name ? `<${e.name}>` : ""}`] : (e = R(e), n ? e : [`${t}=`, e]);
|
|
2068
|
+
}
|
|
2069
|
+
const bn = {
|
|
2070
|
+
sp: "serverPrefetch hook",
|
|
2071
|
+
bc: "beforeCreate hook",
|
|
2072
|
+
c: "created hook",
|
|
2073
|
+
bm: "beforeMount hook",
|
|
2074
|
+
m: "mounted hook",
|
|
2075
|
+
bu: "beforeUpdate hook",
|
|
2076
|
+
u: "updated",
|
|
2077
|
+
bum: "beforeUnmount hook",
|
|
2078
|
+
um: "unmounted hook",
|
|
2079
|
+
a: "activated hook",
|
|
2080
|
+
da: "deactivated hook",
|
|
2081
|
+
ec: "errorCaptured hook",
|
|
2082
|
+
rtc: "renderTracked hook",
|
|
2083
|
+
rtg: "renderTriggered hook",
|
|
2084
|
+
0: "setup function",
|
|
2085
|
+
1: "render function",
|
|
2086
|
+
2: "watcher getter",
|
|
2087
|
+
3: "watcher callback",
|
|
2088
|
+
4: "watcher cleanup function",
|
|
2089
|
+
5: "native event handler",
|
|
2090
|
+
6: "component event handler",
|
|
2091
|
+
7: "vnode hook",
|
|
2092
|
+
8: "directive hook",
|
|
2093
|
+
9: "transition hook",
|
|
2094
|
+
10: "app errorHandler",
|
|
2095
|
+
11: "app warnHandler",
|
|
2096
|
+
12: "ref function",
|
|
2097
|
+
13: "async component loader",
|
|
2098
|
+
14: "scheduler flush",
|
|
2099
|
+
15: "component update",
|
|
2100
|
+
16: "app unmount cleanup function"
|
|
2101
|
+
};
|
|
2102
|
+
function pt(t, e, n, r) {
|
|
2103
|
+
try {
|
|
2104
|
+
return r ? t(...r) : t();
|
|
2105
|
+
} catch (o) {
|
|
2106
|
+
$t(o, e, n);
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
function En(t, e, n, r) {
|
|
2110
|
+
if (M(t)) {
|
|
2111
|
+
const o = pt(t, e, n, r);
|
|
2112
|
+
return o && rr(o) && o.catch((i) => {
|
|
2113
|
+
$t(i, e, n);
|
|
2114
|
+
}), o;
|
|
2115
|
+
}
|
|
2116
|
+
if (V(t)) {
|
|
2117
|
+
const o = [];
|
|
2118
|
+
for (let i = 0; i < t.length; i++)
|
|
2119
|
+
o.push(En(t[i], e, n, r));
|
|
2120
|
+
return o;
|
|
2121
|
+
} else process.env.NODE_ENV !== "production" && W(
|
|
2122
|
+
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof t}`
|
|
2123
|
+
);
|
|
2124
|
+
}
|
|
2125
|
+
function $t(t, e, n, r = !0) {
|
|
2126
|
+
const o = e ? e.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction: c } = e && e.appContext.config || $e;
|
|
2127
|
+
if (e) {
|
|
2128
|
+
let a = e.parent;
|
|
2129
|
+
const p = e.proxy, E = process.env.NODE_ENV !== "production" ? bn[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
|
|
2130
|
+
for (; a; ) {
|
|
2131
|
+
const k = a.ec;
|
|
2132
|
+
if (k) {
|
|
2133
|
+
for (let u = 0; u < k.length; u++)
|
|
2134
|
+
if (k[u](t, p, E) === !1)
|
|
2135
|
+
return;
|
|
2136
|
+
}
|
|
2137
|
+
a = a.parent;
|
|
2138
|
+
}
|
|
2139
|
+
if (i) {
|
|
2140
|
+
ft(), pt(i, null, 10, [
|
|
2141
|
+
t,
|
|
2142
|
+
p,
|
|
2143
|
+
E
|
|
2144
|
+
]), dt();
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
Gr(t, n, o, r, c);
|
|
2149
|
+
}
|
|
2150
|
+
function Gr(t, e, n, r = !0, o = !1) {
|
|
2151
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2152
|
+
const i = bn[e];
|
|
2153
|
+
if (n && Wr(n), W(`Unhandled error${i ? ` during execution of ${i}` : ""}`), n && zr(), r)
|
|
2154
|
+
throw t;
|
|
2155
|
+
console.error(t);
|
|
2156
|
+
} else {
|
|
2157
|
+
if (o)
|
|
2158
|
+
throw t;
|
|
2159
|
+
console.error(t);
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
const Z = [];
|
|
2163
|
+
let le = -1;
|
|
2164
|
+
const xe = [];
|
|
2165
|
+
let pe = null, Oe = 0;
|
|
2166
|
+
const kn = /* @__PURE__ */ Promise.resolve();
|
|
2167
|
+
let rt = null;
|
|
2168
|
+
const Xr = 100;
|
|
2169
|
+
function qt(t) {
|
|
2170
|
+
const e = rt || kn;
|
|
2171
|
+
return t ? e.then(this ? t.bind(this) : t) : e;
|
|
2172
|
+
}
|
|
2173
|
+
function Qr(t) {
|
|
2174
|
+
let e = le + 1, n = Z.length;
|
|
2175
|
+
for (; e < n; ) {
|
|
2176
|
+
const r = e + n >>> 1, o = Z[r], i = Je(o);
|
|
2177
|
+
i < t || i === t && o.flags & 2 ? e = r + 1 : n = r;
|
|
2178
|
+
}
|
|
2179
|
+
return e;
|
|
2180
|
+
}
|
|
2181
|
+
function Sn(t) {
|
|
2182
|
+
if (!(t.flags & 1)) {
|
|
2183
|
+
const e = Je(t), n = Z[Z.length - 1];
|
|
2184
|
+
!n || // fast path when the job id is larger than the tail
|
|
2185
|
+
!(t.flags & 2) && e >= Je(n) ? Z.push(t) : Z.splice(Qr(e), 0, t), t.flags |= 1, Nn();
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
function Nn() {
|
|
2189
|
+
rt || (rt = kn.then(On));
|
|
2190
|
+
}
|
|
2191
|
+
function Tn(t) {
|
|
2192
|
+
V(t) ? xe.push(...t) : pe && t.id === -1 ? pe.splice(Oe + 1, 0, t) : t.flags & 1 || (xe.push(t), t.flags |= 1), Nn();
|
|
2193
|
+
}
|
|
2194
|
+
function Zr(t) {
|
|
2195
|
+
if (xe.length) {
|
|
2196
|
+
const e = [...new Set(xe)].sort(
|
|
2197
|
+
(n, r) => Je(n) - Je(r)
|
|
2198
|
+
);
|
|
2199
|
+
if (xe.length = 0, pe) {
|
|
2200
|
+
pe.push(...e);
|
|
2201
|
+
return;
|
|
2202
|
+
}
|
|
2203
|
+
for (pe = e, process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map()), Oe = 0; Oe < pe.length; Oe++) {
|
|
2204
|
+
const n = pe[Oe];
|
|
2205
|
+
process.env.NODE_ENV !== "production" && In(t, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
|
|
2206
|
+
}
|
|
2207
|
+
pe = null, Oe = 0;
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
const Je = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
|
|
2211
|
+
function On(t) {
|
|
2212
|
+
process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map());
|
|
2213
|
+
const e = process.env.NODE_ENV !== "production" ? (n) => In(t, n) : Re;
|
|
2214
|
+
try {
|
|
2215
|
+
for (le = 0; le < Z.length; le++) {
|
|
2216
|
+
const n = Z[le];
|
|
2217
|
+
if (n && !(n.flags & 8)) {
|
|
2218
|
+
if (process.env.NODE_ENV !== "production" && e(n))
|
|
2219
|
+
continue;
|
|
2220
|
+
n.flags & 4 && (n.flags &= -2), pt(
|
|
2221
|
+
n,
|
|
2222
|
+
n.i,
|
|
2223
|
+
n.i ? 15 : 14
|
|
2224
|
+
), n.flags & 4 || (n.flags &= -2);
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
} finally {
|
|
2228
|
+
for (; le < Z.length; le++) {
|
|
2229
|
+
const n = Z[le];
|
|
2230
|
+
n && (n.flags &= -2);
|
|
2231
|
+
}
|
|
2232
|
+
le = -1, Z.length = 0, Zr(t), rt = null, (Z.length || xe.length) && On(t);
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
function In(t, e) {
|
|
2236
|
+
const n = t.get(e) || 0;
|
|
2237
|
+
if (n > Xr) {
|
|
2238
|
+
const r = e.i, o = r && Hn(r.type);
|
|
2239
|
+
return $t(
|
|
2240
|
+
`Maximum recursive updates exceeded${o ? ` in component <${o}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
2241
|
+
null,
|
|
2242
|
+
10
|
|
2243
|
+
), !0;
|
|
2244
|
+
}
|
|
2245
|
+
return t.set(e, n + 1), !1;
|
|
2246
|
+
}
|
|
2247
|
+
const Et = /* @__PURE__ */ new Map();
|
|
2248
|
+
process.env.NODE_ENV !== "production" && (ut().__VUE_HMR_RUNTIME__ = {
|
|
2249
|
+
createRecord: kt(eo),
|
|
2250
|
+
rerender: kt(to),
|
|
2251
|
+
reload: kt(no)
|
|
2252
|
+
});
|
|
2253
|
+
const ot = /* @__PURE__ */ new Map();
|
|
2254
|
+
function eo(t, e) {
|
|
2255
|
+
return ot.has(t) ? !1 : (ot.set(t, {
|
|
2256
|
+
initialDef: st(e),
|
|
2257
|
+
instances: /* @__PURE__ */ new Set()
|
|
2258
|
+
}), !0);
|
|
2259
|
+
}
|
|
2260
|
+
function st(t) {
|
|
2261
|
+
return Fn(t) ? t.__vccOpts : t;
|
|
2262
|
+
}
|
|
2263
|
+
function to(t, e) {
|
|
2264
|
+
const n = ot.get(t);
|
|
2265
|
+
n && (n.initialDef.render = e, [...n.instances].forEach((r) => {
|
|
2266
|
+
e && (r.render = e, st(r.type).render = e), r.renderCache = [], r.update();
|
|
2267
|
+
}));
|
|
2268
|
+
}
|
|
2269
|
+
function no(t, e) {
|
|
2270
|
+
const n = ot.get(t);
|
|
2271
|
+
if (!n) return;
|
|
2272
|
+
e = st(e), Bt(n.initialDef, e);
|
|
2273
|
+
const r = [...n.instances];
|
|
2274
|
+
for (let o = 0; o < r.length; o++) {
|
|
2275
|
+
const i = r[o], c = st(i.type);
|
|
2276
|
+
let a = Et.get(c);
|
|
2277
|
+
a || (c !== n.initialDef && Bt(c, e), Et.set(c, a = /* @__PURE__ */ new Set())), a.add(i), i.appContext.propsCache.delete(i.type), i.appContext.emitsCache.delete(i.type), i.appContext.optionsCache.delete(i.type), i.ceReload ? (a.add(i), i.ceReload(e.styles), a.delete(i)) : i.parent ? Sn(() => {
|
|
2278
|
+
i.parent.update(), a.delete(i);
|
|
2279
|
+
}) : i.appContext.reload ? i.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
|
|
2280
|
+
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
2281
|
+
), i.root.ce && i !== i.root && i.root.ce._removeChildStyle(c);
|
|
2282
|
+
}
|
|
2283
|
+
Tn(() => {
|
|
2284
|
+
Et.clear();
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2287
|
+
function Bt(t, e) {
|
|
2288
|
+
_e(t, e);
|
|
2289
|
+
for (const n in t)
|
|
2290
|
+
n !== "__file" && !(n in e) && delete t[n];
|
|
2291
|
+
}
|
|
2292
|
+
function kt(t) {
|
|
2293
|
+
return (e, n) => {
|
|
2294
|
+
try {
|
|
2295
|
+
return t(e, n);
|
|
2296
|
+
} catch (r) {
|
|
2297
|
+
console.error(r), console.warn(
|
|
2298
|
+
"[HMR] Something went wrong during Vue component hot-reload. Full reload required."
|
|
2299
|
+
);
|
|
2300
|
+
}
|
|
2301
|
+
};
|
|
2302
|
+
}
|
|
2303
|
+
let Ie, Qe = [];
|
|
2304
|
+
function Rn(t, e) {
|
|
2305
|
+
var n, r;
|
|
2306
|
+
Ie = t, Ie ? (Ie.enabled = !0, Qe.forEach(({ event: o, args: i }) => Ie.emit(o, ...i)), Qe = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
|
|
2307
|
+
window.HTMLElement && // also exclude jsdom
|
|
2308
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
2309
|
+
!((r = (n = window.navigator) == null ? void 0 : n.userAgent) != null && r.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((i) => {
|
|
2310
|
+
Rn(i, e);
|
|
2311
|
+
}), setTimeout(() => {
|
|
2312
|
+
Ie || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, Qe = []);
|
|
2313
|
+
}, 3e3)) : Qe = [];
|
|
2314
|
+
}
|
|
2315
|
+
let ke = null, ro = null;
|
|
2316
|
+
const oo = (t) => t.__isTeleport;
|
|
2317
|
+
function Cn(t, e) {
|
|
2318
|
+
t.shapeFlag & 6 && t.component ? (t.transition = e, Cn(t.component.subTree, e)) : t.shapeFlag & 128 ? (t.ssContent.transition = e.clone(t.ssContent), t.ssFallback.transition = e.clone(t.ssFallback)) : t.transition = e;
|
|
2319
|
+
}
|
|
2320
|
+
ut().requestIdleCallback;
|
|
2321
|
+
ut().cancelIdleCallback;
|
|
2322
|
+
const so = Symbol.for("v-ndc"), io = {};
|
|
2323
|
+
process.env.NODE_ENV !== "production" && (io.ownKeys = (t) => (W(
|
|
2324
|
+
"Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
|
|
2325
|
+
), Reflect.ownKeys(t)));
|
|
2326
|
+
let xn = null;
|
|
2327
|
+
function Dn(t, e, n = !1) {
|
|
2328
|
+
const r = qe || ke;
|
|
2329
|
+
if (r || xn) {
|
|
2330
|
+
const o = r ? r.parent == null ? r.vnode.appContext && r.vnode.appContext.provides : r.parent.provides : void 0;
|
|
2331
|
+
if (o && t in o)
|
|
2332
|
+
return o[t];
|
|
2333
|
+
if (arguments.length > 1)
|
|
2334
|
+
return n && M(e) ? e.call(r && r.proxy) : e;
|
|
2335
|
+
process.env.NODE_ENV !== "production" && W(`injection "${String(t)}" not found.`);
|
|
2336
|
+
} else process.env.NODE_ENV !== "production" && W("inject() can only be used inside setup() or functional components.");
|
|
2337
|
+
}
|
|
2338
|
+
function co() {
|
|
2339
|
+
return !!(qe || ke || xn);
|
|
2340
|
+
}
|
|
2341
|
+
const ao = {}, An = (t) => Object.getPrototypeOf(t) === ao, lo = go, uo = Symbol.for("v-scx"), fo = () => {
|
|
2342
|
+
{
|
|
2343
|
+
const t = Dn(uo);
|
|
2344
|
+
return t || process.env.NODE_ENV !== "production" && W(
|
|
2345
|
+
"Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."
|
|
2346
|
+
), t;
|
|
2347
|
+
}
|
|
2348
|
+
};
|
|
2349
|
+
function Un(t, e, n) {
|
|
2350
|
+
return process.env.NODE_ENV !== "production" && !M(e) && W(
|
|
2351
|
+
"`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."
|
|
2352
|
+
), po(t, e, n);
|
|
2353
|
+
}
|
|
2354
|
+
function po(t, e, n = $e) {
|
|
2355
|
+
const { immediate: r, deep: o, flush: i, once: c } = n;
|
|
2356
|
+
process.env.NODE_ENV !== "production" && !e && (r !== void 0 && W(
|
|
2357
|
+
'watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'
|
|
2358
|
+
), o !== void 0 && W(
|
|
2359
|
+
'watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'
|
|
2360
|
+
), c !== void 0 && W(
|
|
2361
|
+
'watch() "once" option is only respected when using the watch(source, callback, options?) signature.'
|
|
2362
|
+
));
|
|
2363
|
+
const a = _e({}, n);
|
|
2364
|
+
process.env.NODE_ENV !== "production" && (a.onWarn = W);
|
|
2365
|
+
const p = e && r || !e && i !== "post";
|
|
2366
|
+
let E;
|
|
2367
|
+
if (ct) {
|
|
2368
|
+
if (i === "sync") {
|
|
2369
|
+
const S = fo();
|
|
2370
|
+
E = S.__watcherHandles || (S.__watcherHandles = []);
|
|
2371
|
+
} else if (!p) {
|
|
2372
|
+
const S = () => {
|
|
2373
|
+
};
|
|
2374
|
+
return S.stop = Re, S.resume = Re, S.pause = Re, S;
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
const k = qe;
|
|
2378
|
+
a.call = (S, C, L) => En(S, k, C, L);
|
|
2379
|
+
let u = !1;
|
|
2380
|
+
i === "post" ? a.scheduler = (S) => {
|
|
2381
|
+
lo(S, k && k.suspense);
|
|
2382
|
+
} : i !== "sync" && (u = !0, a.scheduler = (S, C) => {
|
|
2383
|
+
C ? S() : Sn(S);
|
|
2384
|
+
}), a.augmentJob = (S) => {
|
|
2385
|
+
e && (S.flags |= 4), u && (S.flags |= 2, k && (S.id = k.uid, S.i = k));
|
|
2386
|
+
};
|
|
2387
|
+
const y = Kr(t, e, a);
|
|
2388
|
+
return ct && (E ? E.push(y) : p && y()), y;
|
|
2389
|
+
}
|
|
2390
|
+
const ho = (t) => t.__isSuspense;
|
|
2391
|
+
function go(t, e) {
|
|
2392
|
+
e && e.pendingBranch ? V(t) ? e.effects.push(...t) : e.effects.push(t) : Tn(t);
|
|
2393
|
+
}
|
|
2394
|
+
const Vn = Symbol.for("v-fgt"), mo = Symbol.for("v-txt"), vo = Symbol.for("v-cmt");
|
|
2395
|
+
function _o(t) {
|
|
2396
|
+
return t ? t.__v_isVNode === !0 : !1;
|
|
2397
|
+
}
|
|
2398
|
+
const yo = (...t) => Ln(
|
|
2399
|
+
...t
|
|
2400
|
+
), Pn = ({ key: t }) => t ?? null, Ze = ({
|
|
2401
|
+
ref: t,
|
|
2402
|
+
ref_key: e,
|
|
2403
|
+
ref_for: n
|
|
2404
|
+
}) => (typeof t == "number" && (t = "" + t), t != null ? ue(t) || P(t) || M(t) ? { i: ke, r: t, k: e, f: !!n } : t : null);
|
|
2405
|
+
function wo(t, e = null, n = null, r = 0, o = null, i = t === Vn ? 0 : 1, c = !1, a = !1) {
|
|
2406
|
+
const p = {
|
|
2407
|
+
__v_isVNode: !0,
|
|
2408
|
+
__v_skip: !0,
|
|
2409
|
+
type: t,
|
|
2410
|
+
props: e,
|
|
2411
|
+
key: e && Pn(e),
|
|
2412
|
+
ref: e && Ze(e),
|
|
2413
|
+
scopeId: ro,
|
|
2414
|
+
slotScopeIds: null,
|
|
2415
|
+
children: n,
|
|
2416
|
+
component: null,
|
|
2417
|
+
suspense: null,
|
|
2418
|
+
ssContent: null,
|
|
2419
|
+
ssFallback: null,
|
|
2420
|
+
dirs: null,
|
|
2421
|
+
transition: null,
|
|
2422
|
+
el: null,
|
|
2423
|
+
anchor: null,
|
|
2424
|
+
target: null,
|
|
2425
|
+
targetStart: null,
|
|
2426
|
+
targetAnchor: null,
|
|
2427
|
+
staticCount: 0,
|
|
2428
|
+
shapeFlag: i,
|
|
2429
|
+
patchFlag: r,
|
|
2430
|
+
dynamicProps: o,
|
|
2431
|
+
dynamicChildren: null,
|
|
2432
|
+
appContext: null,
|
|
2433
|
+
ctx: ke
|
|
2434
|
+
};
|
|
2435
|
+
return a ? (Ft(p, n), i & 128 && t.normalize(p)) : n && (p.shapeFlag |= ue(n) ? 8 : 16), process.env.NODE_ENV !== "production" && p.key !== p.key && W("VNode created with invalid key (NaN). VNode type:", p.type), p;
|
|
2436
|
+
}
|
|
2437
|
+
const bo = process.env.NODE_ENV !== "production" ? yo : Ln;
|
|
2438
|
+
function Ln(t, e = null, n = null, r = 0, o = null, i = !1) {
|
|
2439
|
+
if ((!t || t === so) && (process.env.NODE_ENV !== "production" && !t && W(`Invalid vnode type when creating vnode: ${t}.`), t = vo), _o(t)) {
|
|
2440
|
+
const a = it(
|
|
2441
|
+
t,
|
|
2442
|
+
e,
|
|
2443
|
+
!0
|
|
2444
|
+
/* mergeRef: true */
|
|
2445
|
+
);
|
|
2446
|
+
return n && Ft(a, n), a.patchFlag = -2, a;
|
|
2447
|
+
}
|
|
2448
|
+
if (Fn(t) && (t = t.__vccOpts), e) {
|
|
2449
|
+
e = Eo(e);
|
|
2450
|
+
let { class: a, style: p } = e;
|
|
2451
|
+
a && !ue(a) && (e.class = Ut(a)), B(p) && (We(p) && !V(p) && (p = _e({}, p)), e.style = At(p));
|
|
2452
|
+
}
|
|
2453
|
+
const c = ue(t) ? 1 : ho(t) ? 128 : oo(t) ? 64 : B(t) ? 4 : M(t) ? 2 : 0;
|
|
2454
|
+
return process.env.NODE_ENV !== "production" && c & 4 && We(t) && (t = R(t), W(
|
|
2455
|
+
"Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
|
|
2456
|
+
`
|
|
2457
|
+
Component that was made reactive: `,
|
|
2458
|
+
t
|
|
2459
|
+
)), wo(
|
|
2460
|
+
t,
|
|
2461
|
+
e,
|
|
2462
|
+
n,
|
|
2463
|
+
r,
|
|
2464
|
+
o,
|
|
2465
|
+
c,
|
|
2466
|
+
i,
|
|
2467
|
+
!0
|
|
2468
|
+
);
|
|
2469
|
+
}
|
|
2470
|
+
function Eo(t) {
|
|
2471
|
+
return t ? We(t) || An(t) ? _e({}, t) : t : null;
|
|
2472
|
+
}
|
|
2473
|
+
function it(t, e, n = !1, r = !1) {
|
|
2474
|
+
const { props: o, ref: i, patchFlag: c, children: a, transition: p } = t, E = e ? So(o || {}, e) : o, k = {
|
|
2475
|
+
__v_isVNode: !0,
|
|
2476
|
+
__v_skip: !0,
|
|
2477
|
+
type: t.type,
|
|
2478
|
+
props: E,
|
|
2479
|
+
key: E && Pn(E),
|
|
2480
|
+
ref: e && e.ref ? (
|
|
2481
|
+
// #2078 in the case of <component :is="vnode" ref="extra"/>
|
|
2482
|
+
// if the vnode itself already has a ref, cloneVNode will need to merge
|
|
2483
|
+
// the refs so the single vnode can be set on multiple refs
|
|
2484
|
+
n && i ? V(i) ? i.concat(Ze(e)) : [i, Ze(e)] : Ze(e)
|
|
2485
|
+
) : i,
|
|
2486
|
+
scopeId: t.scopeId,
|
|
2487
|
+
slotScopeIds: t.slotScopeIds,
|
|
2488
|
+
children: process.env.NODE_ENV !== "production" && c === -1 && V(a) ? a.map(Mn) : a,
|
|
2489
|
+
target: t.target,
|
|
2490
|
+
targetStart: t.targetStart,
|
|
2491
|
+
targetAnchor: t.targetAnchor,
|
|
2492
|
+
staticCount: t.staticCount,
|
|
2493
|
+
shapeFlag: t.shapeFlag,
|
|
2494
|
+
// if the vnode is cloned with extra props, we can no longer assume its
|
|
2495
|
+
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
2496
|
+
// note: preserve flag for fragments since they use the flag for children
|
|
2497
|
+
// fast paths only.
|
|
2498
|
+
patchFlag: e && t.type !== Vn ? c === -1 ? 16 : c | 16 : c,
|
|
2499
|
+
dynamicProps: t.dynamicProps,
|
|
2500
|
+
dynamicChildren: t.dynamicChildren,
|
|
2501
|
+
appContext: t.appContext,
|
|
2502
|
+
dirs: t.dirs,
|
|
2503
|
+
transition: p,
|
|
2504
|
+
// These should technically only be non-null on mounted VNodes. However,
|
|
2505
|
+
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
2506
|
+
// them since them being non-null during a mount doesn't affect the logic as
|
|
2507
|
+
// they will simply be overwritten.
|
|
2508
|
+
component: t.component,
|
|
2509
|
+
suspense: t.suspense,
|
|
2510
|
+
ssContent: t.ssContent && it(t.ssContent),
|
|
2511
|
+
ssFallback: t.ssFallback && it(t.ssFallback),
|
|
2512
|
+
el: t.el,
|
|
2513
|
+
anchor: t.anchor,
|
|
2514
|
+
ctx: t.ctx,
|
|
2515
|
+
ce: t.ce
|
|
2516
|
+
};
|
|
2517
|
+
return p && r && Cn(
|
|
2518
|
+
k,
|
|
2519
|
+
p.clone(k)
|
|
2520
|
+
), k;
|
|
2521
|
+
}
|
|
2522
|
+
function Mn(t) {
|
|
2523
|
+
const e = it(t);
|
|
2524
|
+
return V(t.children) && (e.children = t.children.map(Mn)), e;
|
|
2525
|
+
}
|
|
2526
|
+
function ko(t = " ", e = 0) {
|
|
2527
|
+
return bo(mo, null, t, e);
|
|
2528
|
+
}
|
|
2529
|
+
function Ft(t, e) {
|
|
2530
|
+
let n = 0;
|
|
2531
|
+
const { shapeFlag: r } = t;
|
|
2532
|
+
if (e == null)
|
|
2533
|
+
e = null;
|
|
2534
|
+
else if (V(e))
|
|
2535
|
+
n = 16;
|
|
2536
|
+
else if (typeof e == "object")
|
|
2537
|
+
if (r & 65) {
|
|
2538
|
+
const o = e.default;
|
|
2539
|
+
o && (o._c && (o._d = !1), Ft(t, o()), o._c && (o._d = !0));
|
|
2540
|
+
return;
|
|
2541
|
+
} else
|
|
2542
|
+
n = 32, !e._ && !An(e) && (e._ctx = ke);
|
|
2543
|
+
else M(e) ? (e = { default: e, _ctx: ke }, n = 32) : (e = String(e), r & 64 ? (n = 16, e = [ko(e)]) : n = 8);
|
|
2544
|
+
t.children = e, t.shapeFlag |= n;
|
|
2545
|
+
}
|
|
2546
|
+
function So(...t) {
|
|
2547
|
+
const e = {};
|
|
2548
|
+
for (let n = 0; n < t.length; n++) {
|
|
2549
|
+
const r = t[n];
|
|
2550
|
+
for (const o in r)
|
|
2551
|
+
if (o === "class")
|
|
2552
|
+
e.class !== r.class && (e.class = Ut([e.class, r.class]));
|
|
2553
|
+
else if (o === "style")
|
|
2554
|
+
e.style = At([e.style, r.style]);
|
|
2555
|
+
else if (Zn(o)) {
|
|
2556
|
+
const i = e[o], c = r[o];
|
|
2557
|
+
c && i !== c && !(V(i) && i.includes(c)) && (e[o] = i ? [].concat(i, c) : c);
|
|
2558
|
+
} else o !== "" && (e[o] = r[o]);
|
|
2559
|
+
}
|
|
2560
|
+
return e;
|
|
2561
|
+
}
|
|
2562
|
+
let qe = null;
|
|
2563
|
+
const jn = () => qe || ke;
|
|
2564
|
+
{
|
|
2565
|
+
const t = ut(), e = (n, r) => {
|
|
2566
|
+
let o;
|
|
2567
|
+
return (o = t[n]) || (o = t[n] = []), o.push(r), (i) => {
|
|
2568
|
+
o.length > 1 ? o.forEach((c) => c(i)) : o[0](i);
|
|
2569
|
+
};
|
|
2570
|
+
};
|
|
2571
|
+
e(
|
|
2572
|
+
"__VUE_INSTANCE_SETTERS__",
|
|
2573
|
+
(n) => qe = n
|
|
2574
|
+
), e(
|
|
2575
|
+
"__VUE_SSR_SETTERS__",
|
|
2576
|
+
(n) => ct = n
|
|
2577
|
+
);
|
|
2578
|
+
}
|
|
2579
|
+
let ct = !1;
|
|
2580
|
+
process.env.NODE_ENV;
|
|
2581
|
+
const No = /(?:^|[-_])(\w)/g, To = (t) => t.replace(No, (e) => e.toUpperCase()).replace(/[-_]/g, "");
|
|
2582
|
+
function Hn(t, e = !0) {
|
|
2583
|
+
return M(t) ? t.displayName || t.name : t.name || e && t.__name;
|
|
2584
|
+
}
|
|
2585
|
+
function $n(t, e, n = !1) {
|
|
2586
|
+
let r = Hn(e);
|
|
2587
|
+
if (!r && e.__file) {
|
|
2588
|
+
const o = e.__file.match(/([^/\\]+)\.\w+$/);
|
|
2589
|
+
o && (r = o[1]);
|
|
2590
|
+
}
|
|
2591
|
+
if (!r && t && t.parent) {
|
|
2592
|
+
const o = (i) => {
|
|
2593
|
+
for (const c in i)
|
|
2594
|
+
if (i[c] === e)
|
|
2595
|
+
return c;
|
|
2596
|
+
};
|
|
2597
|
+
r = o(
|
|
2598
|
+
t.components || t.parent.type.components
|
|
2599
|
+
) || o(t.appContext.components);
|
|
2600
|
+
}
|
|
2601
|
+
return r ? To(r) : n ? "App" : "Anonymous";
|
|
2602
|
+
}
|
|
2603
|
+
function Fn(t) {
|
|
2604
|
+
return M(t) && "__vccOpts" in t;
|
|
2605
|
+
}
|
|
2606
|
+
const Kn = (t, e) => {
|
|
2607
|
+
const n = $r(t, e, ct);
|
|
2608
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2609
|
+
const r = jn();
|
|
2610
|
+
r && r.appContext.config.warnRecursiveComputed && (n._warnRecursive = !0);
|
|
2611
|
+
}
|
|
2612
|
+
return n;
|
|
2613
|
+
};
|
|
2614
|
+
function Oo() {
|
|
2615
|
+
if (process.env.NODE_ENV === "production" || typeof window > "u")
|
|
2616
|
+
return;
|
|
2617
|
+
const t = { style: "color:#3ba776" }, e = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, r = { style: "color:#eb2f96" }, o = {
|
|
2618
|
+
__vue_custom_formatter: !0,
|
|
2619
|
+
header(u) {
|
|
2620
|
+
return B(u) ? u.__isVue ? ["div", t, "VueInstance"] : P(u) ? [
|
|
2621
|
+
"div",
|
|
2622
|
+
{},
|
|
2623
|
+
["span", t, k(u)],
|
|
2624
|
+
"<",
|
|
2625
|
+
// avoid debugger accessing value affecting behavior
|
|
2626
|
+
a("_value" in u ? u._value : u),
|
|
2627
|
+
">"
|
|
2628
|
+
] : ve(u) ? [
|
|
2629
|
+
"div",
|
|
2630
|
+
{},
|
|
2631
|
+
["span", t, G(u) ? "ShallowReactive" : "Reactive"],
|
|
2632
|
+
"<",
|
|
2633
|
+
a(u),
|
|
2634
|
+
`>${fe(u) ? " (readonly)" : ""}`
|
|
2635
|
+
] : fe(u) ? [
|
|
2636
|
+
"div",
|
|
2637
|
+
{},
|
|
2638
|
+
["span", t, G(u) ? "ShallowReadonly" : "Readonly"],
|
|
2639
|
+
"<",
|
|
2640
|
+
a(u),
|
|
2641
|
+
">"
|
|
2642
|
+
] : null : null;
|
|
2643
|
+
},
|
|
2644
|
+
hasBody(u) {
|
|
2645
|
+
return u && u.__isVue;
|
|
2646
|
+
},
|
|
2647
|
+
body(u) {
|
|
2648
|
+
if (u && u.__isVue)
|
|
2649
|
+
return [
|
|
2650
|
+
"div",
|
|
2651
|
+
{},
|
|
2652
|
+
...i(u.$)
|
|
2653
|
+
];
|
|
2654
|
+
}
|
|
2655
|
+
};
|
|
2656
|
+
function i(u) {
|
|
2657
|
+
const y = [];
|
|
2658
|
+
u.type.props && u.props && y.push(c("props", R(u.props))), u.setupState !== $e && y.push(c("setup", u.setupState)), u.data !== $e && y.push(c("data", R(u.data)));
|
|
2659
|
+
const S = p(u, "computed");
|
|
2660
|
+
S && y.push(c("computed", S));
|
|
2661
|
+
const C = p(u, "inject");
|
|
2662
|
+
return C && y.push(c("injected", C)), y.push([
|
|
2663
|
+
"div",
|
|
2664
|
+
{},
|
|
2665
|
+
[
|
|
2666
|
+
"span",
|
|
2667
|
+
{
|
|
2668
|
+
style: r.style + ";opacity:0.66"
|
|
2669
|
+
},
|
|
2670
|
+
"$ (internal): "
|
|
2671
|
+
],
|
|
2672
|
+
["object", { object: u }]
|
|
2673
|
+
]), y;
|
|
2674
|
+
}
|
|
2675
|
+
function c(u, y) {
|
|
2676
|
+
return y = _e({}, y), Object.keys(y).length ? [
|
|
2677
|
+
"div",
|
|
2678
|
+
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
2679
|
+
[
|
|
2680
|
+
"div",
|
|
2681
|
+
{
|
|
2682
|
+
style: "color:#476582"
|
|
2683
|
+
},
|
|
2684
|
+
u
|
|
2685
|
+
],
|
|
2686
|
+
[
|
|
2687
|
+
"div",
|
|
2688
|
+
{
|
|
2689
|
+
style: "padding-left:1.25em"
|
|
2690
|
+
},
|
|
2691
|
+
...Object.keys(y).map((S) => [
|
|
2692
|
+
"div",
|
|
2693
|
+
{},
|
|
2694
|
+
["span", r, S + ": "],
|
|
2695
|
+
a(y[S], !1)
|
|
2696
|
+
])
|
|
2697
|
+
]
|
|
2698
|
+
] : ["span", {}];
|
|
2699
|
+
}
|
|
2700
|
+
function a(u, y = !0) {
|
|
2701
|
+
return typeof u == "number" ? ["span", e, u] : typeof u == "string" ? ["span", n, JSON.stringify(u)] : typeof u == "boolean" ? ["span", r, u] : B(u) ? ["object", { object: y ? R(u) : u }] : ["span", n, String(u)];
|
|
2702
|
+
}
|
|
2703
|
+
function p(u, y) {
|
|
2704
|
+
const S = u.type;
|
|
2705
|
+
if (M(S))
|
|
2706
|
+
return;
|
|
2707
|
+
const C = {};
|
|
2708
|
+
for (const L in u.ctx)
|
|
2709
|
+
E(S, L, y) && (C[L] = u.ctx[L]);
|
|
2710
|
+
return C;
|
|
2711
|
+
}
|
|
2712
|
+
function E(u, y, S) {
|
|
2713
|
+
const C = u[S];
|
|
2714
|
+
if (V(C) && C.includes(y) || B(C) && y in C || u.extends && E(u.extends, y, S) || u.mixins && u.mixins.some((L) => E(L, y, S)))
|
|
2715
|
+
return !0;
|
|
2716
|
+
}
|
|
2717
|
+
function k(u) {
|
|
2718
|
+
return G(u) ? "ShallowRef" : u.effect ? "ComputedRef" : "Ref";
|
|
2719
|
+
}
|
|
2720
|
+
window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
|
|
2721
|
+
}
|
|
2722
|
+
process.env.NODE_ENV;
|
|
2723
|
+
process.env.NODE_ENV;
|
|
2724
|
+
process.env.NODE_ENV;
|
|
2725
|
+
/**
|
|
2726
|
+
* vue v3.5.13
|
|
2727
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
2728
|
+
* @license MIT
|
|
2729
|
+
**/
|
|
2730
|
+
function Io() {
|
|
2731
|
+
Oo();
|
|
2732
|
+
}
|
|
2733
|
+
process.env.NODE_ENV !== "production" && Io();
|
|
2734
|
+
/*!
|
|
2735
|
+
* pinia v3.0.1
|
|
2736
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
2737
|
+
* @license MIT
|
|
2738
|
+
*/
|
|
2739
|
+
let Pe;
|
|
2740
|
+
const at = (t) => Pe = t, Ro = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
2741
|
+
/* istanbul ignore next */
|
|
2742
|
+
Symbol()
|
|
2743
|
+
);
|
|
2744
|
+
function Se(t) {
|
|
2745
|
+
return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
|
|
2746
|
+
}
|
|
2747
|
+
var He;
|
|
2748
|
+
(function(t) {
|
|
2749
|
+
t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
|
|
2750
|
+
})(He || (He = {}));
|
|
2751
|
+
const Le = typeof window < "u";
|
|
2752
|
+
function Wn(t, e) {
|
|
2753
|
+
for (const n in e) {
|
|
2754
|
+
const r = e[n];
|
|
2755
|
+
if (!(n in t))
|
|
2756
|
+
continue;
|
|
2757
|
+
const o = t[n];
|
|
2758
|
+
Se(o) && Se(r) && !P(r) && !ve(r) ? t[n] = Wn(o, r) : t[n] = r;
|
|
2759
|
+
}
|
|
2760
|
+
return t;
|
|
2761
|
+
}
|
|
2762
|
+
const zn = () => {
|
|
2763
|
+
};
|
|
2764
|
+
function Gt(t, e, n, r = zn) {
|
|
2765
|
+
t.push(e);
|
|
2766
|
+
const o = () => {
|
|
2767
|
+
const i = t.indexOf(e);
|
|
2768
|
+
i > -1 && (t.splice(i, 1), r());
|
|
2769
|
+
};
|
|
2770
|
+
return !n && nn() && gr(o), o;
|
|
2771
|
+
}
|
|
2772
|
+
function Te(t, ...e) {
|
|
2773
|
+
t.slice().forEach((n) => {
|
|
2774
|
+
n(...e);
|
|
2775
|
+
});
|
|
2776
|
+
}
|
|
2777
|
+
const Co = (t) => t(), Xt = Symbol(), St = Symbol();
|
|
2778
|
+
function Rt(t, e) {
|
|
2779
|
+
t instanceof Map && e instanceof Map ? e.forEach((n, r) => t.set(r, n)) : t instanceof Set && e instanceof Set && e.forEach(t.add, t);
|
|
2780
|
+
for (const n in e) {
|
|
2781
|
+
if (!e.hasOwnProperty(n))
|
|
2782
|
+
continue;
|
|
2783
|
+
const r = e[n], o = t[n];
|
|
2784
|
+
Se(o) && Se(r) && t.hasOwnProperty(n) && !P(r) && !ve(r) ? t[n] = Rt(o, r) : t[n] = r;
|
|
2785
|
+
}
|
|
2786
|
+
return t;
|
|
2787
|
+
}
|
|
2788
|
+
const xo = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2789
|
+
/* istanbul ignore next */
|
|
2790
|
+
Symbol()
|
|
2791
|
+
);
|
|
2792
|
+
function Do(t) {
|
|
2793
|
+
return !Se(t) || !t.hasOwnProperty(xo);
|
|
2794
|
+
}
|
|
2795
|
+
const { assign: Q } = Object;
|
|
2796
|
+
function Qt(t) {
|
|
2797
|
+
return !!(P(t) && t.effect);
|
|
2798
|
+
}
|
|
2799
|
+
function Zt(t, e, n, r) {
|
|
2800
|
+
const { state: o, actions: i, getters: c } = e, a = n.state.value[t];
|
|
2801
|
+
let p;
|
|
2802
|
+
function E() {
|
|
2803
|
+
!a && (process.env.NODE_ENV === "production" || !r) && (n.state.value[t] = o ? o() : {});
|
|
2804
|
+
const k = process.env.NODE_ENV !== "production" && r ? (
|
|
2805
|
+
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2806
|
+
Yt(ze(o ? o() : {}).value)
|
|
2807
|
+
) : Yt(n.state.value[t]);
|
|
2808
|
+
return Q(k, i, Object.keys(c || {}).reduce((u, y) => (process.env.NODE_ENV !== "production" && y in k && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${y}" in store "${t}".`), u[y] = Ve(Kn(() => {
|
|
2809
|
+
at(n);
|
|
2810
|
+
const S = n._s.get(t);
|
|
2811
|
+
return c[y].call(S, S);
|
|
2812
|
+
})), u), {}));
|
|
2813
|
+
}
|
|
2814
|
+
return p = Ct(t, E, e, n, r, !0), p;
|
|
2815
|
+
}
|
|
2816
|
+
function Ct(t, e, n = {}, r, o, i) {
|
|
2817
|
+
let c;
|
|
2818
|
+
const a = Q({ actions: {} }, n);
|
|
2819
|
+
if (process.env.NODE_ENV !== "production" && !r._e.active)
|
|
2820
|
+
throw new Error("Pinia destroyed");
|
|
2821
|
+
const p = { deep: !0 };
|
|
2822
|
+
process.env.NODE_ENV !== "production" && (p.onTrigger = (b) => {
|
|
2823
|
+
E ? S = b : E == !1 && !N._hotUpdating && (Array.isArray(S) ? S.push(b) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2824
|
+
});
|
|
2825
|
+
let E, k, u = [], y = [], S;
|
|
2826
|
+
const C = r.state.value[t];
|
|
2827
|
+
!i && !C && (process.env.NODE_ENV === "production" || !o) && (r.state.value[t] = {});
|
|
2828
|
+
const L = ze({});
|
|
2829
|
+
let j;
|
|
2830
|
+
function de(b) {
|
|
2831
|
+
let _;
|
|
2832
|
+
E = k = !1, process.env.NODE_ENV !== "production" && (S = []), typeof b == "function" ? (b(r.state.value[t]), _ = {
|
|
2833
|
+
type: He.patchFunction,
|
|
2834
|
+
storeId: t,
|
|
2835
|
+
events: S
|
|
2836
|
+
}) : (Rt(r.state.value[t], b), _ = {
|
|
2837
|
+
type: He.patchObject,
|
|
2838
|
+
payload: b,
|
|
2839
|
+
storeId: t,
|
|
2840
|
+
events: S
|
|
2841
|
+
});
|
|
2842
|
+
const D = j = Symbol();
|
|
2843
|
+
qt().then(() => {
|
|
2844
|
+
j === D && (E = !0);
|
|
2845
|
+
}), k = !0, Te(u, _, r.state.value[t]);
|
|
2846
|
+
}
|
|
2847
|
+
const te = i ? function() {
|
|
2848
|
+
const { state: _ } = n, D = _ ? _() : {};
|
|
2849
|
+
this.$patch((J) => {
|
|
2850
|
+
Q(J, D);
|
|
2851
|
+
});
|
|
2852
|
+
} : (
|
|
2853
|
+
/* istanbul ignore next */
|
|
2854
|
+
process.env.NODE_ENV !== "production" ? () => {
|
|
2855
|
+
throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`);
|
|
2856
|
+
} : zn
|
|
2857
|
+
);
|
|
2858
|
+
function z() {
|
|
2859
|
+
c.stop(), u = [], y = [], r._s.delete(t);
|
|
2860
|
+
}
|
|
2861
|
+
const X = (b, _ = "") => {
|
|
2862
|
+
if (Xt in b)
|
|
2863
|
+
return b[St] = _, b;
|
|
2864
|
+
const D = function() {
|
|
2865
|
+
at(r);
|
|
2866
|
+
const J = Array.from(arguments), ie = [], oe = [];
|
|
2867
|
+
function De($) {
|
|
2868
|
+
ie.push($);
|
|
2869
|
+
}
|
|
2870
|
+
function Ae($) {
|
|
2871
|
+
oe.push($);
|
|
2872
|
+
}
|
|
2873
|
+
Te(y, {
|
|
2874
|
+
args: J,
|
|
2875
|
+
name: D[St],
|
|
2876
|
+
store: N,
|
|
2877
|
+
after: De,
|
|
2878
|
+
onError: Ae
|
|
2879
|
+
});
|
|
2880
|
+
let ye;
|
|
2881
|
+
try {
|
|
2882
|
+
ye = b.apply(this && this.$id === t ? this : N, J);
|
|
2883
|
+
} catch ($) {
|
|
2884
|
+
throw Te(oe, $), $;
|
|
2885
|
+
}
|
|
2886
|
+
return ye instanceof Promise ? ye.then(($) => (Te(ie, $), $)).catch(($) => (Te(oe, $), Promise.reject($))) : (Te(ie, ye), ye);
|
|
2887
|
+
};
|
|
2888
|
+
return D[Xt] = !0, D[St] = _, D;
|
|
2889
|
+
}, T = /* @__PURE__ */ Ve({
|
|
2890
|
+
actions: {},
|
|
2891
|
+
getters: {},
|
|
2892
|
+
state: [],
|
|
2893
|
+
hotState: L
|
|
2894
|
+
}), H = {
|
|
2895
|
+
_p: r,
|
|
2896
|
+
// _s: scope,
|
|
2897
|
+
$id: t,
|
|
2898
|
+
$onAction: Gt.bind(null, y),
|
|
2899
|
+
$patch: de,
|
|
2900
|
+
$reset: te,
|
|
2901
|
+
$subscribe(b, _ = {}) {
|
|
2902
|
+
const D = Gt(u, b, _.detached, () => J()), J = c.run(() => Un(() => r.state.value[t], (ie) => {
|
|
2903
|
+
(_.flush === "sync" ? k : E) && b({
|
|
2904
|
+
storeId: t,
|
|
2905
|
+
type: He.direct,
|
|
2906
|
+
events: S
|
|
2907
|
+
}, ie);
|
|
2908
|
+
}, Q({}, p, _)));
|
|
2909
|
+
return D;
|
|
2910
|
+
},
|
|
2911
|
+
$dispose: z
|
|
2912
|
+
}, N = Ht(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Le ? Q(
|
|
2913
|
+
{
|
|
2914
|
+
_hmrPayload: T,
|
|
2915
|
+
_customProperties: Ve(/* @__PURE__ */ new Set())
|
|
2916
|
+
// devtools custom properties
|
|
2917
|
+
},
|
|
2918
|
+
H
|
|
2919
|
+
// must be added later
|
|
2920
|
+
// setupStore
|
|
2921
|
+
) : H);
|
|
2922
|
+
r._s.set(t, N);
|
|
2923
|
+
const re = (r._a && r._a.runWithContext || Co)(() => r._e.run(() => (c = hr()).run(() => e({ action: X }))));
|
|
2924
|
+
for (const b in re) {
|
|
2925
|
+
const _ = re[b];
|
|
2926
|
+
if (P(_) && !Qt(_) || ve(_))
|
|
2927
|
+
process.env.NODE_ENV !== "production" && o ? L.value[b] = wt(re, b) : i || (C && Do(_) && (P(_) ? _.value = C[b] : Rt(_, C[b])), r.state.value[t][b] = _), process.env.NODE_ENV !== "production" && T.state.push(b);
|
|
2928
|
+
else if (typeof _ == "function") {
|
|
2929
|
+
const D = process.env.NODE_ENV !== "production" && o ? _ : X(_, b);
|
|
2930
|
+
re[b] = D, process.env.NODE_ENV !== "production" && (T.actions[b] = _), a.actions[b] = _;
|
|
2931
|
+
} else process.env.NODE_ENV !== "production" && Qt(_) && (T.getters[b] = i ? (
|
|
2932
|
+
// @ts-expect-error
|
|
2933
|
+
n.getters[b]
|
|
2934
|
+
) : _, Le && (re._getters || // @ts-expect-error: same
|
|
2935
|
+
(re._getters = Ve([]))).push(b));
|
|
2936
|
+
}
|
|
2937
|
+
if (Q(N, re), Q(R(N), re), Object.defineProperty(N, "$state", {
|
|
2938
|
+
get: () => process.env.NODE_ENV !== "production" && o ? L.value : r.state.value[t],
|
|
2939
|
+
set: (b) => {
|
|
2940
|
+
if (process.env.NODE_ENV !== "production" && o)
|
|
2941
|
+
throw new Error("cannot set hotState");
|
|
2942
|
+
de((_) => {
|
|
2943
|
+
Q(_, b);
|
|
2944
|
+
});
|
|
2945
|
+
}
|
|
2946
|
+
}), process.env.NODE_ENV !== "production" && (N._hotUpdate = Ve((b) => {
|
|
2947
|
+
N._hotUpdating = !0, b._hmrPayload.state.forEach((_) => {
|
|
2948
|
+
if (_ in N.$state) {
|
|
2949
|
+
const D = b.$state[_], J = N.$state[_];
|
|
2950
|
+
typeof D == "object" && Se(D) && Se(J) ? Wn(D, J) : b.$state[_] = J;
|
|
2951
|
+
}
|
|
2952
|
+
N[_] = wt(b.$state, _);
|
|
2953
|
+
}), Object.keys(N.$state).forEach((_) => {
|
|
2954
|
+
_ in b.$state || delete N[_];
|
|
2955
|
+
}), E = !1, k = !1, r.state.value[t] = wt(b._hmrPayload, "hotState"), k = !0, qt().then(() => {
|
|
2956
|
+
E = !0;
|
|
2957
|
+
});
|
|
2958
|
+
for (const _ in b._hmrPayload.actions) {
|
|
2959
|
+
const D = b[_];
|
|
2960
|
+
N[_] = //
|
|
2961
|
+
X(D, _);
|
|
2962
|
+
}
|
|
2963
|
+
for (const _ in b._hmrPayload.getters) {
|
|
2964
|
+
const D = b._hmrPayload.getters[_], J = i ? (
|
|
2965
|
+
// special handling of options api
|
|
2966
|
+
Kn(() => (at(r), D.call(N, N)))
|
|
2967
|
+
) : D;
|
|
2968
|
+
N[_] = //
|
|
2969
|
+
J;
|
|
2970
|
+
}
|
|
2971
|
+
Object.keys(N._hmrPayload.getters).forEach((_) => {
|
|
2972
|
+
_ in b._hmrPayload.getters || delete N[_];
|
|
2973
|
+
}), Object.keys(N._hmrPayload.actions).forEach((_) => {
|
|
2974
|
+
_ in b._hmrPayload.actions || delete N[_];
|
|
2975
|
+
}), N._hmrPayload = b._hmrPayload, N._getters = b._getters, N._hotUpdating = !1;
|
|
2976
|
+
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Le) {
|
|
2977
|
+
const b = {
|
|
2978
|
+
writable: !0,
|
|
2979
|
+
configurable: !0,
|
|
2980
|
+
// avoid warning on devtools trying to display this property
|
|
2981
|
+
enumerable: !1
|
|
2982
|
+
};
|
|
2983
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((_) => {
|
|
2984
|
+
Object.defineProperty(N, _, Q({ value: N[_] }, b));
|
|
2985
|
+
});
|
|
2986
|
+
}
|
|
2987
|
+
return r._p.forEach((b) => {
|
|
2988
|
+
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Le) {
|
|
2989
|
+
const _ = c.run(() => b({
|
|
2990
|
+
store: N,
|
|
2991
|
+
app: r._a,
|
|
2992
|
+
pinia: r,
|
|
2993
|
+
options: a
|
|
2994
|
+
}));
|
|
2995
|
+
Object.keys(_ || {}).forEach((D) => N._customProperties.add(D)), Q(N, _);
|
|
2996
|
+
} else
|
|
2997
|
+
Q(N, c.run(() => b({
|
|
2998
|
+
store: N,
|
|
2999
|
+
app: r._a,
|
|
3000
|
+
pinia: r,
|
|
3001
|
+
options: a
|
|
3002
|
+
})));
|
|
3003
|
+
}), process.env.NODE_ENV !== "production" && N.$state && typeof N.$state == "object" && typeof N.$state.constructor == "function" && !N.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
3004
|
+
state: () => new MyClass()
|
|
3005
|
+
Found in store "${N.$id}".`), C && i && n.hydrate && n.hydrate(N.$state, C), E = !0, k = !0, N;
|
|
3006
|
+
}
|
|
3007
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
3008
|
+
// @__NO_SIDE_EFFECTS__
|
|
3009
|
+
function Jn(t, e, n) {
|
|
3010
|
+
let r;
|
|
3011
|
+
const o = typeof e == "function";
|
|
3012
|
+
r = o ? n : e;
|
|
3013
|
+
function i(c, a) {
|
|
3014
|
+
const p = co();
|
|
3015
|
+
if (c = // in test mode, ignore the argument provided as we can always retrieve a
|
|
3016
|
+
// pinia instance with getActivePinia()
|
|
3017
|
+
(process.env.NODE_ENV === "test" && Pe && Pe._testing ? null : c) || (p ? Dn(Ro, null) : null), c && at(c), process.env.NODE_ENV !== "production" && !Pe)
|
|
3018
|
+
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
3019
|
+
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
3020
|
+
This will fail in production.`);
|
|
3021
|
+
c = Pe, c._s.has(t) || (o ? Ct(t, e, r, c) : Zt(t, r, c), process.env.NODE_ENV !== "production" && (i._pinia = c));
|
|
3022
|
+
const E = c._s.get(t);
|
|
3023
|
+
if (process.env.NODE_ENV !== "production" && a) {
|
|
3024
|
+
const k = "__hot:" + t, u = o ? Ct(k, e, r, c, !0) : Zt(k, Q({}, r), c, !0);
|
|
3025
|
+
a._hotUpdate(u), delete c.state.value[k], c._s.delete(k);
|
|
3026
|
+
}
|
|
3027
|
+
if (process.env.NODE_ENV !== "production" && Le) {
|
|
3028
|
+
const k = jn();
|
|
3029
|
+
if (k && k.proxy && // avoid adding stores that are just built for hot module replacement
|
|
3030
|
+
!a) {
|
|
3031
|
+
const u = k.proxy, y = "_pStores" in u ? u._pStores : u._pStores = {};
|
|
3032
|
+
y[t] = E;
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
return E;
|
|
3036
|
+
}
|
|
3037
|
+
return i.$id = t, i;
|
|
3038
|
+
}
|
|
3039
|
+
const Ao = "GHENT_CDH_AUTH_STORE", Uo = /* @__PURE__ */ Jn(Ao, () => {
|
|
3040
|
+
const t = Pr(!1), e = ze(), n = ze(!1);
|
|
3041
|
+
return xt.init().then((o) => (t.value = o.isAuthenticated, e.value = o, n.value = !0, o)), {
|
|
3042
|
+
token: () => {
|
|
3043
|
+
var o;
|
|
3044
|
+
return (o = e.value) == null ? void 0 : o.token;
|
|
3045
|
+
},
|
|
3046
|
+
user: () => {
|
|
3047
|
+
var o;
|
|
3048
|
+
return (o = e.value) == null ? void 0 : o.userInfo;
|
|
3049
|
+
},
|
|
3050
|
+
isAuthenticated: () => {
|
|
3051
|
+
var o;
|
|
3052
|
+
return (o = e.value) == null ? void 0 : o.isAuthenticated;
|
|
3053
|
+
},
|
|
3054
|
+
logout: () => {
|
|
3055
|
+
console.warn("logout");
|
|
3056
|
+
},
|
|
3057
|
+
updateToken: async () => {
|
|
3058
|
+
var o;
|
|
3059
|
+
return n.value || await new Promise((i) => {
|
|
3060
|
+
const c = Un(n, (a) => {
|
|
3061
|
+
a && (c(), i());
|
|
3062
|
+
});
|
|
3063
|
+
}), (o = e.value) == null ? void 0 : o.updateToken();
|
|
3064
|
+
}
|
|
3065
|
+
};
|
|
3066
|
+
}), Vo = "GHENT_CDH_HTTP_REQUEST", Po = /* @__PURE__ */ Jn(Vo, () => {
|
|
3067
|
+
const t = Uo(), e = async (n, r, o = { contentType: "application/json" }) => {
|
|
3068
|
+
const i = {
|
|
3069
|
+
accept: "application/json",
|
|
3070
|
+
...r.headers ?? {}
|
|
3071
|
+
};
|
|
3072
|
+
o.contentType && (i["Content-Type"] = o.contentType), o != null && o.skipAuth || (await t.updateToken(), i.Authorization = `Bearer ${t.token()}`);
|
|
3073
|
+
const c = new URL(n, window.location.href);
|
|
3074
|
+
if (o != null && o.queryParams)
|
|
3075
|
+
for (const [p, E] of Object.entries(o.queryParams))
|
|
3076
|
+
c.searchParams.set(p, E);
|
|
3077
|
+
const a = await fetch(c.toString(), {
|
|
3078
|
+
...r,
|
|
3079
|
+
headers: i
|
|
3080
|
+
});
|
|
3081
|
+
return a.ok ? a.json() : (o != null && o.skipAuth, Promise.reject({
|
|
3082
|
+
content: a.body,
|
|
3083
|
+
status: a.status
|
|
3084
|
+
}));
|
|
3085
|
+
};
|
|
3086
|
+
return {
|
|
3087
|
+
get: (n, r) => e(n, { method: "GET" }, r),
|
|
3088
|
+
postFile: (n, r, o = {}, i) => {
|
|
3089
|
+
const c = new FormData();
|
|
3090
|
+
for (const a in o)
|
|
3091
|
+
c.append(a, o[a]);
|
|
3092
|
+
return c.append("file", r), e(
|
|
3093
|
+
n,
|
|
3094
|
+
{
|
|
3095
|
+
method: "POST",
|
|
3096
|
+
body: c
|
|
3097
|
+
},
|
|
3098
|
+
{ ...i, contentType: void 0 }
|
|
3099
|
+
);
|
|
3100
|
+
},
|
|
3101
|
+
post: (n, r, o) => e(
|
|
3102
|
+
n,
|
|
3103
|
+
{
|
|
3104
|
+
method: "POST",
|
|
3105
|
+
body: JSON.stringify(r)
|
|
3106
|
+
},
|
|
3107
|
+
o
|
|
3108
|
+
),
|
|
3109
|
+
patch: (n, r, o) => e(
|
|
3110
|
+
n,
|
|
3111
|
+
{
|
|
3112
|
+
method: "PATCH",
|
|
3113
|
+
body: JSON.stringify(r)
|
|
3114
|
+
},
|
|
3115
|
+
o
|
|
3116
|
+
),
|
|
3117
|
+
delete: (n, r, o) => e(
|
|
3118
|
+
n,
|
|
3119
|
+
{
|
|
3120
|
+
method: "DELETE",
|
|
3121
|
+
body: JSON.stringify(r)
|
|
3122
|
+
},
|
|
3123
|
+
o
|
|
3124
|
+
)
|
|
3125
|
+
};
|
|
3126
|
+
});
|
|
3127
|
+
export {
|
|
3128
|
+
xt as KeycloakAdapter,
|
|
3129
|
+
Uo as useAuthenticationStore,
|
|
3130
|
+
Po as useHttpStore
|
|
3131
|
+
};
|