@ghentcdh/authentication-vue 0.0.2-5 → 0.0.2-7
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 +598 -2765
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { defineStore as G } from "pinia";
|
|
2
|
+
import { shallowRef as oe, ref as F, watch as ae } from "vue";
|
|
3
|
+
function q(k) {
|
|
4
|
+
if (!(this instanceof q))
|
|
3
5
|
throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");
|
|
4
|
-
if (typeof
|
|
6
|
+
if (typeof k != "string" && !O(k))
|
|
5
7
|
throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");
|
|
6
|
-
if (
|
|
7
|
-
const
|
|
8
|
-
for (const
|
|
9
|
-
if (!t
|
|
10
|
-
throw new Error(`The configuration object is missing the required '${
|
|
8
|
+
if (O(k)) {
|
|
9
|
+
const r = "oidcProvider" in k ? ["clientId"] : ["url", "realm", "clientId"];
|
|
10
|
+
for (const t of r)
|
|
11
|
+
if (!k[t])
|
|
12
|
+
throw new Error(`The configuration object is missing the required '${t}' property.`);
|
|
11
13
|
}
|
|
12
|
-
var e = this,
|
|
14
|
+
var e = this, p, m = [], l, h = {
|
|
13
15
|
enable: !0,
|
|
14
16
|
callbackList: [],
|
|
15
17
|
interval: 5
|
|
16
18
|
};
|
|
17
19
|
e.didInitialize = !1;
|
|
18
|
-
var
|
|
19
|
-
globalThis.isSecureContext ||
|
|
20
|
+
var b = !0, w = Y(console.info), A = Y(console.warn);
|
|
21
|
+
globalThis.isSecureContext || A(
|
|
20
22
|
`[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
23
|
Continuing to run your application insecurely will lead to unexpected behavior and breakage.
|
|
22
24
|
|
|
23
25
|
For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`
|
|
24
|
-
), e.init = function(
|
|
26
|
+
), e.init = function(r = {}) {
|
|
25
27
|
if (e.didInitialize)
|
|
26
28
|
throw new Error("A 'Keycloak' instance can only be initialized once.");
|
|
27
|
-
e.didInitialize = !0, e.authenticated = !1,
|
|
28
|
-
var
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
31
|
-
e.responseMode =
|
|
29
|
+
e.didInitialize = !0, e.authenticated = !1, l = ne();
|
|
30
|
+
var t = ["default", "cordova", "cordova-native"];
|
|
31
|
+
if (t.indexOf(r.adapter) > -1 ? p = M(r.adapter) : typeof r.adapter == "object" ? p = r.adapter : window.Cordova || window.cordova ? p = M("cordova") : p = M(), typeof r.useNonce < "u" && (b = r.useNonce), typeof r.checkLoginIframe < "u" && (h.enable = r.checkLoginIframe), r.checkLoginIframeInterval && (h.interval = r.checkLoginIframeInterval), r.onLoad === "login-required" && (e.loginRequired = !0), r.responseMode)
|
|
32
|
+
if (r.responseMode === "query" || r.responseMode === "fragment")
|
|
33
|
+
e.responseMode = r.responseMode;
|
|
32
34
|
else
|
|
33
35
|
throw "Invalid value for responseMode";
|
|
34
|
-
if (
|
|
35
|
-
switch (
|
|
36
|
+
if (r.flow) {
|
|
37
|
+
switch (r.flow) {
|
|
36
38
|
case "standard":
|
|
37
39
|
e.responseType = "code";
|
|
38
40
|
break;
|
|
@@ -45,766 +47,766 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
45
47
|
default:
|
|
46
48
|
throw "Invalid value for flow";
|
|
47
49
|
}
|
|
48
|
-
e.flow =
|
|
50
|
+
e.flow = r.flow;
|
|
49
51
|
}
|
|
50
|
-
if (
|
|
51
|
-
if (
|
|
52
|
-
throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${
|
|
53
|
-
e.pkceMethod =
|
|
52
|
+
if (r.timeSkew != null && (e.timeSkew = r.timeSkew), r.redirectUri && (e.redirectUri = r.redirectUri), r.silentCheckSsoRedirectUri && (e.silentCheckSsoRedirectUri = r.silentCheckSsoRedirectUri), typeof r.silentCheckSsoFallback == "boolean" ? e.silentCheckSsoFallback = r.silentCheckSsoFallback : e.silentCheckSsoFallback = !0, typeof r.pkceMethod < "u") {
|
|
53
|
+
if (r.pkceMethod !== "S256" && r.pkceMethod !== !1)
|
|
54
|
+
throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${r.pkceMethod}.`);
|
|
55
|
+
e.pkceMethod = r.pkceMethod;
|
|
54
56
|
} else
|
|
55
57
|
e.pkceMethod = "S256";
|
|
56
|
-
typeof
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
e.onReady && e.onReady(e.authenticated),
|
|
60
|
-
}).catch(function(
|
|
61
|
-
|
|
58
|
+
typeof r.enableLogging == "boolean" ? e.enableLogging = r.enableLogging : e.enableLogging = !1, r.logoutMethod === "POST" ? e.logoutMethod = "POST" : e.logoutMethod = "GET", typeof r.scope == "string" && (e.scope = r.scope), typeof r.acrValues == "string" && (e.acrValues = r.acrValues), typeof r.messageReceiveTimeout == "number" && r.messageReceiveTimeout > 0 ? e.messageReceiveTimeout = r.messageReceiveTimeout : e.messageReceiveTimeout = 1e4, e.responseMode || (e.responseMode = "fragment"), e.responseType || (e.responseType = "code", e.flow = "standard");
|
|
59
|
+
var i = v(), s = v();
|
|
60
|
+
s.promise.then(function() {
|
|
61
|
+
e.onReady && e.onReady(e.authenticated), i.setSuccess(e.authenticated);
|
|
62
|
+
}).catch(function(o) {
|
|
63
|
+
i.setError(o);
|
|
62
64
|
});
|
|
63
|
-
var
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}).catch(function(
|
|
69
|
-
|
|
65
|
+
var a = Z();
|
|
66
|
+
function c() {
|
|
67
|
+
var o = function(d) {
|
|
68
|
+
d || (f.prompt = "none"), r.locale && (f.locale = r.locale), e.login(f).then(function() {
|
|
69
|
+
s.setSuccess();
|
|
70
|
+
}).catch(function(g) {
|
|
71
|
+
s.setError(g);
|
|
70
72
|
});
|
|
71
|
-
},
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
var
|
|
75
|
-
if (!(
|
|
76
|
-
var
|
|
77
|
-
|
|
73
|
+
}, u = async function() {
|
|
74
|
+
var d = document.createElement("iframe"), g = await e.createLoginUrl({ prompt: "none", redirectUri: e.silentCheckSsoRedirectUri });
|
|
75
|
+
d.setAttribute("src", g), d.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), d.setAttribute("title", "keycloak-silent-check-sso"), d.style.display = "none", document.body.appendChild(d);
|
|
76
|
+
var y = function(T) {
|
|
77
|
+
if (!(T.origin !== window.location.origin || d.contentWindow !== T.source)) {
|
|
78
|
+
var S = E(T.data);
|
|
79
|
+
U(S, s), document.body.removeChild(d), window.removeEventListener("message", y);
|
|
78
80
|
}
|
|
79
81
|
};
|
|
80
|
-
window.addEventListener("message",
|
|
81
|
-
},
|
|
82
|
-
switch (
|
|
82
|
+
window.addEventListener("message", y);
|
|
83
|
+
}, f = {};
|
|
84
|
+
switch (r.onLoad) {
|
|
83
85
|
case "check-sso":
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}).catch(function(
|
|
88
|
-
|
|
86
|
+
h.enable ? x().then(function() {
|
|
87
|
+
L().then(function(d) {
|
|
88
|
+
d ? s.setSuccess() : e.silentCheckSsoRedirectUri ? u() : o(!1);
|
|
89
|
+
}).catch(function(d) {
|
|
90
|
+
s.setError(d);
|
|
89
91
|
});
|
|
90
|
-
}) : e.silentCheckSsoRedirectUri ?
|
|
92
|
+
}) : e.silentCheckSsoRedirectUri ? u() : o(!1);
|
|
91
93
|
break;
|
|
92
94
|
case "login-required":
|
|
93
|
-
|
|
95
|
+
o(!0);
|
|
94
96
|
break;
|
|
95
97
|
default:
|
|
96
98
|
throw "Invalid value for onLoad";
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
|
-
function
|
|
100
|
-
var
|
|
101
|
-
if (
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
}).catch(function(
|
|
105
|
-
|
|
101
|
+
function n() {
|
|
102
|
+
var o = E(window.location.href);
|
|
103
|
+
if (o && window.history.replaceState(window.history.state, null, o.newUrl), o && o.valid)
|
|
104
|
+
return x().then(function() {
|
|
105
|
+
U(o, s);
|
|
106
|
+
}).catch(function(u) {
|
|
107
|
+
s.setError(u);
|
|
106
108
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}).catch(function(
|
|
111
|
-
|
|
109
|
+
r.token && r.refreshToken ? (C(r.token, r.refreshToken, r.idToken), h.enable ? x().then(function() {
|
|
110
|
+
L().then(function(u) {
|
|
111
|
+
u ? (e.onAuthSuccess && e.onAuthSuccess(), s.setSuccess(), P()) : s.setSuccess();
|
|
112
|
+
}).catch(function(u) {
|
|
113
|
+
s.setError(u);
|
|
112
114
|
});
|
|
113
115
|
}) : e.updateToken(-1).then(function() {
|
|
114
|
-
e.onAuthSuccess && e.onAuthSuccess(),
|
|
115
|
-
}).catch(function(
|
|
116
|
-
e.onAuthError && e.onAuthError(),
|
|
117
|
-
})) :
|
|
118
|
-
}
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
e.onAuthSuccess && e.onAuthSuccess(), s.setSuccess();
|
|
117
|
+
}).catch(function(u) {
|
|
118
|
+
e.onAuthError && e.onAuthError(), r.onLoad ? c() : s.setError(u);
|
|
119
|
+
})) : r.onLoad ? c() : s.setSuccess();
|
|
120
|
+
}
|
|
121
|
+
return a.then(function() {
|
|
122
|
+
te().then(n).catch(function(o) {
|
|
123
|
+
i.setError(o);
|
|
122
124
|
});
|
|
123
|
-
}),
|
|
124
|
-
|
|
125
|
-
}),
|
|
126
|
-
}, e.login = function(
|
|
127
|
-
return
|
|
125
|
+
}), a.catch(function(o) {
|
|
126
|
+
i.setError(o);
|
|
127
|
+
}), i.promise;
|
|
128
|
+
}, e.login = function(r) {
|
|
129
|
+
return p.login(r);
|
|
128
130
|
};
|
|
129
|
-
function
|
|
131
|
+
function R(r) {
|
|
130
132
|
if (typeof crypto > "u" || typeof crypto.getRandomValues > "u")
|
|
131
133
|
throw new Error("Web Crypto API is not available.");
|
|
132
|
-
return crypto.getRandomValues(new Uint8Array(
|
|
134
|
+
return crypto.getRandomValues(new Uint8Array(r));
|
|
133
135
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
136
|
+
function B(r) {
|
|
137
|
+
return X(r, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
|
136
138
|
}
|
|
137
|
-
function
|
|
138
|
-
for (var
|
|
139
|
-
|
|
140
|
-
return String.fromCharCode.apply(null,
|
|
139
|
+
function X(r, t) {
|
|
140
|
+
for (var i = R(r), s = new Array(r), a = 0; a < r; a++)
|
|
141
|
+
s[a] = t.charCodeAt(i[a] % t.length);
|
|
142
|
+
return String.fromCharCode.apply(null, s);
|
|
141
143
|
}
|
|
142
|
-
async function
|
|
143
|
-
if (
|
|
144
|
-
throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${
|
|
145
|
-
const
|
|
146
|
-
return
|
|
144
|
+
async function W(r, t) {
|
|
145
|
+
if (r !== "S256")
|
|
146
|
+
throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${r}'.`);
|
|
147
|
+
const i = new Uint8Array(await ie(t));
|
|
148
|
+
return se(i).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
|
|
147
149
|
}
|
|
148
|
-
function
|
|
149
|
-
var
|
|
150
|
+
function $(r) {
|
|
151
|
+
var t = {
|
|
150
152
|
id_token: {
|
|
151
|
-
acr:
|
|
153
|
+
acr: r
|
|
152
154
|
}
|
|
153
155
|
};
|
|
154
|
-
return JSON.stringify(
|
|
155
|
-
}
|
|
156
|
-
e.createLoginUrl = async function(
|
|
157
|
-
var
|
|
158
|
-
state:
|
|
159
|
-
nonce:
|
|
160
|
-
redirectUri: encodeURIComponent(
|
|
161
|
-
loginOptions:
|
|
156
|
+
return JSON.stringify(t);
|
|
157
|
+
}
|
|
158
|
+
e.createLoginUrl = async function(r) {
|
|
159
|
+
var t = V(), i = V(), s = p.redirectUri(r), a = {
|
|
160
|
+
state: t,
|
|
161
|
+
nonce: i,
|
|
162
|
+
redirectUri: encodeURIComponent(s),
|
|
163
|
+
loginOptions: r
|
|
162
164
|
};
|
|
163
|
-
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
var
|
|
169
|
-
if (
|
|
170
|
-
var
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
if ((
|
|
165
|
+
r && r.prompt && (a.prompt = r.prompt);
|
|
166
|
+
var c;
|
|
167
|
+
r && r.action == "register" ? c = e.endpoints.register() : c = e.endpoints.authorize();
|
|
168
|
+
var n = r && r.scope || e.scope;
|
|
169
|
+
n ? n.indexOf("openid") === -1 && (n = "openid " + n) : n = "openid";
|
|
170
|
+
var o = c + "?client_id=" + encodeURIComponent(e.clientId) + "&redirect_uri=" + encodeURIComponent(s) + "&state=" + encodeURIComponent(t) + "&response_mode=" + encodeURIComponent(e.responseMode) + "&response_type=" + encodeURIComponent(e.responseType) + "&scope=" + encodeURIComponent(n);
|
|
171
|
+
if (b && (o = o + "&nonce=" + encodeURIComponent(i)), r && r.prompt && (o += "&prompt=" + encodeURIComponent(r.prompt)), r && typeof r.maxAge == "number" && (o += "&max_age=" + encodeURIComponent(r.maxAge)), r && r.loginHint && (o += "&login_hint=" + encodeURIComponent(r.loginHint)), r && r.idpHint && (o += "&kc_idp_hint=" + encodeURIComponent(r.idpHint)), r && r.action && r.action != "register" && (o += "&kc_action=" + encodeURIComponent(r.action)), r && r.locale && (o += "&ui_locales=" + encodeURIComponent(r.locale)), r && r.acr) {
|
|
172
|
+
var u = $(r.acr);
|
|
173
|
+
o += "&claims=" + encodeURIComponent(u);
|
|
174
|
+
}
|
|
175
|
+
if ((r && r.acrValues || e.acrValues) && (o += "&acr_values=" + encodeURIComponent(r.acrValues || e.acrValues)), e.pkceMethod)
|
|
174
176
|
try {
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
} catch (
|
|
178
|
-
throw new Error("Failed to generate PKCE challenge.", { cause:
|
|
177
|
+
const f = B(96), d = await W(e.pkceMethod, f);
|
|
178
|
+
a.pkceCodeVerifier = f, o += "&code_challenge=" + d, o += "&code_challenge_method=" + e.pkceMethod;
|
|
179
|
+
} catch (f) {
|
|
180
|
+
throw new Error("Failed to generate PKCE challenge.", { cause: f });
|
|
179
181
|
}
|
|
180
|
-
return
|
|
181
|
-
}, e.logout = function(
|
|
182
|
-
return
|
|
183
|
-
}, e.createLogoutUrl = function(
|
|
184
|
-
if (((
|
|
182
|
+
return l.add(a), o;
|
|
183
|
+
}, e.logout = function(r) {
|
|
184
|
+
return p.logout(r);
|
|
185
|
+
}, e.createLogoutUrl = function(r) {
|
|
186
|
+
if (((r == null ? void 0 : r.logoutMethod) ?? e.logoutMethod) === "POST")
|
|
185
187
|
return e.endpoints.logout();
|
|
186
|
-
var
|
|
187
|
-
return e.idToken && (
|
|
188
|
-
}, e.register = function(
|
|
189
|
-
return
|
|
190
|
-
}, e.createRegisterUrl = async function(
|
|
191
|
-
return
|
|
192
|
-
}, e.createAccountUrl = function(
|
|
193
|
-
var
|
|
194
|
-
return typeof
|
|
188
|
+
var i = e.endpoints.logout() + "?client_id=" + encodeURIComponent(e.clientId) + "&post_logout_redirect_uri=" + encodeURIComponent(p.redirectUri(r, !1));
|
|
189
|
+
return e.idToken && (i += "&id_token_hint=" + encodeURIComponent(e.idToken)), i;
|
|
190
|
+
}, e.register = function(r) {
|
|
191
|
+
return p.register(r);
|
|
192
|
+
}, e.createRegisterUrl = async function(r) {
|
|
193
|
+
return r || (r = {}), r.action = "register", await e.createLoginUrl(r);
|
|
194
|
+
}, e.createAccountUrl = function(r) {
|
|
195
|
+
var t = _(), i = void 0;
|
|
196
|
+
return typeof t < "u" && (i = t + "/account?referrer=" + encodeURIComponent(e.clientId) + "&referrer_uri=" + encodeURIComponent(p.redirectUri(r))), i;
|
|
195
197
|
}, e.accountManagement = function() {
|
|
196
|
-
return
|
|
197
|
-
}, e.hasRealmRole = function(
|
|
198
|
-
var
|
|
199
|
-
return !!
|
|
200
|
-
}, e.hasResourceRole = function(
|
|
198
|
+
return p.accountManagement();
|
|
199
|
+
}, e.hasRealmRole = function(r) {
|
|
200
|
+
var t = e.realmAccess;
|
|
201
|
+
return !!t && t.roles.indexOf(r) >= 0;
|
|
202
|
+
}, e.hasResourceRole = function(r, t) {
|
|
201
203
|
if (!e.resourceAccess)
|
|
202
204
|
return !1;
|
|
203
|
-
var
|
|
204
|
-
return !!
|
|
205
|
+
var i = e.resourceAccess[t || e.clientId];
|
|
206
|
+
return !!i && i.roles.indexOf(r) >= 0;
|
|
205
207
|
}, e.loadUserProfile = function() {
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
var
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
},
|
|
208
|
+
var r = _() + "/account", t = new XMLHttpRequest();
|
|
209
|
+
t.open("GET", r, !0), t.setRequestHeader("Accept", "application/json"), t.setRequestHeader("Authorization", "bearer " + e.token);
|
|
210
|
+
var i = v();
|
|
211
|
+
return t.onreadystatechange = function() {
|
|
212
|
+
t.readyState == 4 && (t.status == 200 ? (e.profile = JSON.parse(t.responseText), i.setSuccess(e.profile)) : i.setError());
|
|
213
|
+
}, t.send(), i.promise;
|
|
212
214
|
}, e.loadUserInfo = function() {
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
var
|
|
216
|
-
return
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
}, e.isTokenExpired = function(
|
|
215
|
+
var r = e.endpoints.userinfo(), t = new XMLHttpRequest();
|
|
216
|
+
t.open("GET", r, !0), t.setRequestHeader("Accept", "application/json"), t.setRequestHeader("Authorization", "bearer " + e.token);
|
|
217
|
+
var i = v();
|
|
218
|
+
return t.onreadystatechange = function() {
|
|
219
|
+
t.readyState == 4 && (t.status == 200 ? (e.userInfo = JSON.parse(t.responseText), i.setSuccess(e.userInfo)) : i.setError());
|
|
220
|
+
}, t.send(), i.promise;
|
|
221
|
+
}, e.isTokenExpired = function(r) {
|
|
220
222
|
if (!e.tokenParsed || !e.refreshToken && e.flow != "implicit")
|
|
221
223
|
throw "Not authenticated";
|
|
222
224
|
if (e.timeSkew == null)
|
|
223
|
-
return
|
|
224
|
-
var
|
|
225
|
-
if (
|
|
226
|
-
if (isNaN(
|
|
225
|
+
return w("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"), !0;
|
|
226
|
+
var t = e.tokenParsed.exp - Math.ceil((/* @__PURE__ */ new Date()).getTime() / 1e3) + e.timeSkew;
|
|
227
|
+
if (r) {
|
|
228
|
+
if (isNaN(r))
|
|
227
229
|
throw "Invalid minValidity";
|
|
228
|
-
|
|
230
|
+
t -= r;
|
|
229
231
|
}
|
|
230
|
-
return
|
|
231
|
-
}, e.updateToken = function(
|
|
232
|
-
var
|
|
232
|
+
return t < 0;
|
|
233
|
+
}, e.updateToken = function(r) {
|
|
234
|
+
var t = v();
|
|
233
235
|
if (!e.refreshToken)
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
var
|
|
238
|
-
if (
|
|
239
|
-
|
|
236
|
+
return t.setError(), t.promise;
|
|
237
|
+
r = r || 5;
|
|
238
|
+
var i = function() {
|
|
239
|
+
var a = !1;
|
|
240
|
+
if (r == -1 ? (a = !0, w("[KEYCLOAK] Refreshing token: forced refresh")) : (!e.tokenParsed || e.isTokenExpired(r)) && (a = !0, w("[KEYCLOAK] Refreshing token: token expired")), !a)
|
|
241
|
+
t.setSuccess(!1);
|
|
240
242
|
else {
|
|
241
|
-
var
|
|
242
|
-
if (
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
if (
|
|
248
|
-
if (
|
|
249
|
-
|
|
250
|
-
var
|
|
251
|
-
|
|
252
|
-
for (var
|
|
253
|
-
|
|
243
|
+
var c = "grant_type=refresh_token&refresh_token=" + e.refreshToken, n = e.endpoints.token();
|
|
244
|
+
if (m.push(t), m.length == 1) {
|
|
245
|
+
var o = new XMLHttpRequest();
|
|
246
|
+
o.open("POST", n, !0), o.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), o.withCredentials = !0, c += "&client_id=" + encodeURIComponent(e.clientId);
|
|
247
|
+
var u = (/* @__PURE__ */ new Date()).getTime();
|
|
248
|
+
o.onreadystatechange = function() {
|
|
249
|
+
if (o.readyState == 4)
|
|
250
|
+
if (o.status == 200) {
|
|
251
|
+
w("[KEYCLOAK] Token refreshed"), u = (u + (/* @__PURE__ */ new Date()).getTime()) / 2;
|
|
252
|
+
var f = JSON.parse(o.responseText);
|
|
253
|
+
C(f.access_token, f.refresh_token, f.id_token, u), e.onAuthRefreshSuccess && e.onAuthRefreshSuccess();
|
|
254
|
+
for (var d = m.pop(); d != null; d = m.pop())
|
|
255
|
+
d.setSuccess(!0);
|
|
254
256
|
} else {
|
|
255
|
-
|
|
256
|
-
for (var
|
|
257
|
-
|
|
257
|
+
A("[KEYCLOAK] Failed to refresh token"), o.status == 400 && e.clearToken(), e.onAuthRefreshError && e.onAuthRefreshError();
|
|
258
|
+
for (var d = m.pop(); d != null; d = m.pop())
|
|
259
|
+
d.setError("Failed to refresh token: An unexpected HTTP error occurred while attempting to refresh the token.");
|
|
258
260
|
}
|
|
259
|
-
},
|
|
261
|
+
}, o.send(c);
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
264
|
};
|
|
263
|
-
if (
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}).catch(function(
|
|
268
|
-
|
|
265
|
+
if (h.enable) {
|
|
266
|
+
var s = L();
|
|
267
|
+
s.then(function() {
|
|
268
|
+
i();
|
|
269
|
+
}).catch(function(a) {
|
|
270
|
+
t.setError(a);
|
|
269
271
|
});
|
|
270
272
|
} else
|
|
271
|
-
|
|
272
|
-
return
|
|
273
|
+
i();
|
|
274
|
+
return t.promise;
|
|
273
275
|
}, e.clearToken = function() {
|
|
274
|
-
e.token && (
|
|
276
|
+
e.token && (C(null, null, null), e.onAuthLogout && e.onAuthLogout(), e.loginRequired && e.login());
|
|
275
277
|
};
|
|
276
|
-
function
|
|
278
|
+
function _() {
|
|
277
279
|
if (typeof e.authServerUrl < "u")
|
|
278
280
|
return e.authServerUrl.charAt(e.authServerUrl.length - 1) == "/" ? e.authServerUrl + "realms/" + encodeURIComponent(e.realm) : e.authServerUrl + "/realms/" + encodeURIComponent(e.realm);
|
|
279
281
|
}
|
|
280
|
-
function
|
|
282
|
+
function Q() {
|
|
281
283
|
return window.location.origin ? window.location.origin : window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
|
|
282
284
|
}
|
|
283
|
-
function
|
|
284
|
-
var
|
|
285
|
-
if (
|
|
286
|
-
if (
|
|
287
|
-
if (
|
|
288
|
-
e.login(
|
|
285
|
+
function U(r, t) {
|
|
286
|
+
var i = r.code, s = r.error, a = r.prompt, c = (/* @__PURE__ */ new Date()).getTime();
|
|
287
|
+
if (r.kc_action_status && e.onActionUpdate && e.onActionUpdate(r.kc_action_status, r.kc_action), s) {
|
|
288
|
+
if (a != "none")
|
|
289
|
+
if (r.error_description && r.error_description === "authentication_expired")
|
|
290
|
+
e.login(r.loginOptions);
|
|
289
291
|
else {
|
|
290
|
-
var
|
|
291
|
-
e.onAuthError && e.onAuthError(
|
|
292
|
+
var n = { error: s, error_description: r.error_description };
|
|
293
|
+
e.onAuthError && e.onAuthError(n), t && t.setError(n);
|
|
292
294
|
}
|
|
293
295
|
else
|
|
294
|
-
|
|
296
|
+
t && t.setSuccess();
|
|
295
297
|
return;
|
|
296
|
-
} else e.flow != "standard" && (
|
|
297
|
-
if (e.flow != "implicit" &&
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
if (
|
|
301
|
-
if (
|
|
302
|
-
var
|
|
303
|
-
|
|
298
|
+
} else e.flow != "standard" && (r.access_token || r.id_token) && d(r.access_token, null, r.id_token, !0);
|
|
299
|
+
if (e.flow != "implicit" && i) {
|
|
300
|
+
var o = "code=" + i + "&grant_type=authorization_code", u = e.endpoints.token(), f = new XMLHttpRequest();
|
|
301
|
+
f.open("POST", u, !0), f.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), o += "&client_id=" + encodeURIComponent(e.clientId), o += "&redirect_uri=" + r.redirectUri, r.pkceCodeVerifier && (o += "&code_verifier=" + r.pkceCodeVerifier), f.withCredentials = !0, f.onreadystatechange = function() {
|
|
302
|
+
if (f.readyState == 4)
|
|
303
|
+
if (f.status == 200) {
|
|
304
|
+
var g = JSON.parse(f.responseText);
|
|
305
|
+
d(g.access_token, g.refresh_token, g.id_token, e.flow === "standard"), P();
|
|
304
306
|
} else
|
|
305
|
-
e.onAuthError && e.onAuthError(),
|
|
306
|
-
},
|
|
307
|
+
e.onAuthError && e.onAuthError(), t && t.setError();
|
|
308
|
+
}, f.send(o);
|
|
307
309
|
}
|
|
308
|
-
function
|
|
309
|
-
|
|
310
|
+
function d(g, y, T, S) {
|
|
311
|
+
c = (c + (/* @__PURE__ */ new Date()).getTime()) / 2, C(g, y, T, c), b && e.idTokenParsed && e.idTokenParsed.nonce != r.storedNonce ? (w("[KEYCLOAK] Invalid nonce, clearing token"), e.clearToken(), t && t.setError()) : S && (e.onAuthSuccess && e.onAuthSuccess(), t && t.setSuccess());
|
|
310
312
|
}
|
|
311
313
|
}
|
|
312
|
-
function
|
|
313
|
-
var
|
|
314
|
-
typeof
|
|
315
|
-
function
|
|
316
|
-
|
|
314
|
+
function Z() {
|
|
315
|
+
var r = v(), t;
|
|
316
|
+
typeof k == "string" && (t = k);
|
|
317
|
+
function i(n) {
|
|
318
|
+
n ? e.endpoints = {
|
|
317
319
|
authorize: function() {
|
|
318
|
-
return
|
|
320
|
+
return n.authorization_endpoint;
|
|
319
321
|
},
|
|
320
322
|
token: function() {
|
|
321
|
-
return
|
|
323
|
+
return n.token_endpoint;
|
|
322
324
|
},
|
|
323
325
|
logout: function() {
|
|
324
|
-
if (!
|
|
326
|
+
if (!n.end_session_endpoint)
|
|
325
327
|
throw "Not supported by the OIDC server";
|
|
326
|
-
return
|
|
328
|
+
return n.end_session_endpoint;
|
|
327
329
|
},
|
|
328
330
|
checkSessionIframe: function() {
|
|
329
|
-
if (!
|
|
331
|
+
if (!n.check_session_iframe)
|
|
330
332
|
throw "Not supported by the OIDC server";
|
|
331
|
-
return
|
|
333
|
+
return n.check_session_iframe;
|
|
332
334
|
},
|
|
333
335
|
register: function() {
|
|
334
336
|
throw 'Redirection to "Register user" page not supported in standard OIDC mode';
|
|
335
337
|
},
|
|
336
338
|
userinfo: function() {
|
|
337
|
-
if (!
|
|
339
|
+
if (!n.userinfo_endpoint)
|
|
338
340
|
throw "Not supported by the OIDC server";
|
|
339
|
-
return
|
|
341
|
+
return n.userinfo_endpoint;
|
|
340
342
|
}
|
|
341
343
|
} : e.endpoints = {
|
|
342
344
|
authorize: function() {
|
|
343
|
-
return
|
|
345
|
+
return _() + "/protocol/openid-connect/auth";
|
|
344
346
|
},
|
|
345
347
|
token: function() {
|
|
346
|
-
return
|
|
348
|
+
return _() + "/protocol/openid-connect/token";
|
|
347
349
|
},
|
|
348
350
|
logout: function() {
|
|
349
|
-
return
|
|
351
|
+
return _() + "/protocol/openid-connect/logout";
|
|
350
352
|
},
|
|
351
353
|
checkSessionIframe: function() {
|
|
352
|
-
return
|
|
354
|
+
return _() + "/protocol/openid-connect/login-status-iframe.html";
|
|
353
355
|
},
|
|
354
356
|
thirdPartyCookiesIframe: function() {
|
|
355
|
-
return
|
|
357
|
+
return _() + "/protocol/openid-connect/3p-cookies/step1.html";
|
|
356
358
|
},
|
|
357
359
|
register: function() {
|
|
358
|
-
return
|
|
360
|
+
return _() + "/protocol/openid-connect/registrations";
|
|
359
361
|
},
|
|
360
362
|
userinfo: function() {
|
|
361
|
-
return
|
|
363
|
+
return _() + "/protocol/openid-connect/userinfo";
|
|
362
364
|
}
|
|
363
365
|
};
|
|
364
366
|
}
|
|
365
|
-
if (
|
|
366
|
-
var
|
|
367
|
-
|
|
368
|
-
if (
|
|
369
|
-
if (
|
|
370
|
-
var
|
|
371
|
-
e.authServerUrl =
|
|
367
|
+
if (t) {
|
|
368
|
+
var s = new XMLHttpRequest();
|
|
369
|
+
s.open("GET", t, !0), s.setRequestHeader("Accept", "application/json"), s.onreadystatechange = function() {
|
|
370
|
+
if (s.readyState == 4)
|
|
371
|
+
if (s.status == 200 || J(s)) {
|
|
372
|
+
var n = JSON.parse(s.responseText);
|
|
373
|
+
e.authServerUrl = n["auth-server-url"], e.realm = n.realm, e.clientId = n.resource, i(null), r.setSuccess();
|
|
372
374
|
} else
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
+
r.setError();
|
|
376
|
+
}, s.send();
|
|
375
377
|
} else {
|
|
376
|
-
e.clientId =
|
|
377
|
-
var
|
|
378
|
-
if (!
|
|
379
|
-
e.authServerUrl =
|
|
380
|
-
else if (typeof
|
|
381
|
-
var
|
|
382
|
-
|
|
383
|
-
var
|
|
384
|
-
|
|
385
|
-
if (
|
|
386
|
-
if (
|
|
387
|
-
var
|
|
388
|
-
|
|
378
|
+
e.clientId = k.clientId;
|
|
379
|
+
var a = k.oidcProvider;
|
|
380
|
+
if (!a)
|
|
381
|
+
e.authServerUrl = k.url, e.realm = k.realm, i(null), r.setSuccess();
|
|
382
|
+
else if (typeof a == "string") {
|
|
383
|
+
var c;
|
|
384
|
+
a.charAt(a.length - 1) == "/" ? c = a + ".well-known/openid-configuration" : c = a + "/.well-known/openid-configuration";
|
|
385
|
+
var s = new XMLHttpRequest();
|
|
386
|
+
s.open("GET", c, !0), s.setRequestHeader("Accept", "application/json"), s.onreadystatechange = function() {
|
|
387
|
+
if (s.readyState == 4)
|
|
388
|
+
if (s.status == 200 || J(s)) {
|
|
389
|
+
var o = JSON.parse(s.responseText);
|
|
390
|
+
i(o), r.setSuccess();
|
|
389
391
|
} else
|
|
390
|
-
|
|
391
|
-
},
|
|
392
|
+
r.setError();
|
|
393
|
+
}, s.send();
|
|
392
394
|
} else
|
|
393
|
-
|
|
395
|
+
i(a), r.setSuccess();
|
|
394
396
|
}
|
|
395
|
-
return
|
|
397
|
+
return r.promise;
|
|
396
398
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
399
|
+
function J(r) {
|
|
400
|
+
return r.status == 0 && r.responseText && r.responseURL.startsWith("file:");
|
|
399
401
|
}
|
|
400
|
-
function
|
|
401
|
-
if (e.tokenTimeoutHandle && (clearTimeout(e.tokenTimeoutHandle), e.tokenTimeoutHandle = null),
|
|
402
|
-
if (e.token =
|
|
403
|
-
var
|
|
404
|
-
|
|
402
|
+
function C(r, t, i, s) {
|
|
403
|
+
if (e.tokenTimeoutHandle && (clearTimeout(e.tokenTimeoutHandle), e.tokenTimeoutHandle = null), t ? (e.refreshToken = t, e.refreshTokenParsed = D(t)) : (delete e.refreshToken, delete e.refreshTokenParsed), i ? (e.idToken = i, e.idTokenParsed = D(i)) : (delete e.idToken, delete e.idTokenParsed), r) {
|
|
404
|
+
if (e.token = r, e.tokenParsed = D(r), 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, s && (e.timeSkew = Math.floor(s / 1e3) - e.tokenParsed.iat), e.timeSkew != null && (w("[KEYCLOAK] Estimated time difference between browser and server is " + e.timeSkew + " seconds"), e.onTokenExpired)) {
|
|
405
|
+
var a = (e.tokenParsed.exp - (/* @__PURE__ */ new Date()).getTime() / 1e3 + e.timeSkew) * 1e3;
|
|
406
|
+
w("[KEYCLOAK] Token expires in " + Math.round(a / 1e3) + " s"), a <= 0 ? e.onTokenExpired() : e.tokenTimeoutHandle = setTimeout(e.onTokenExpired, a);
|
|
405
407
|
}
|
|
406
408
|
} else
|
|
407
409
|
delete e.token, delete e.tokenParsed, delete e.subject, delete e.realmAccess, delete e.resourceAccess, e.authenticated = !1;
|
|
408
410
|
}
|
|
409
|
-
function
|
|
411
|
+
function V() {
|
|
410
412
|
if (typeof crypto > "u" || typeof crypto.randomUUID > "u")
|
|
411
413
|
throw new Error("Web Crypto API is not available.");
|
|
412
414
|
return crypto.randomUUID();
|
|
413
415
|
}
|
|
414
|
-
function
|
|
415
|
-
var
|
|
416
|
-
if (
|
|
417
|
-
var
|
|
418
|
-
return
|
|
416
|
+
function E(r) {
|
|
417
|
+
var t = ee(r);
|
|
418
|
+
if (t) {
|
|
419
|
+
var i = l.get(t.state);
|
|
420
|
+
return i && (t.valid = !0, t.redirectUri = i.redirectUri, t.storedNonce = i.nonce, t.prompt = i.prompt, t.pkceCodeVerifier = i.pkceCodeVerifier, t.loginOptions = i.loginOptions), t;
|
|
419
421
|
}
|
|
420
422
|
}
|
|
421
|
-
function
|
|
422
|
-
var
|
|
423
|
+
function ee(r) {
|
|
424
|
+
var t;
|
|
423
425
|
switch (e.flow) {
|
|
424
426
|
case "standard":
|
|
425
|
-
|
|
427
|
+
t = ["code", "state", "session_state", "kc_action_status", "kc_action", "iss"];
|
|
426
428
|
break;
|
|
427
429
|
case "implicit":
|
|
428
|
-
|
|
430
|
+
t = ["access_token", "token_type", "id_token", "state", "session_state", "expires_in", "kc_action_status", "kc_action", "iss"];
|
|
429
431
|
break;
|
|
430
432
|
case "hybrid":
|
|
431
|
-
|
|
433
|
+
t = ["access_token", "token_type", "id_token", "code", "state", "session_state", "expires_in", "kc_action_status", "kc_action", "iss"];
|
|
432
434
|
break;
|
|
433
435
|
}
|
|
434
|
-
|
|
435
|
-
var
|
|
436
|
-
if (e.responseMode === "query" &&
|
|
436
|
+
t.push("error"), t.push("error_description"), t.push("error_uri");
|
|
437
|
+
var i = r.indexOf("?"), s = r.indexOf("#"), a, c;
|
|
438
|
+
if (e.responseMode === "query" && i !== -1 ? (a = r.substring(0, i), c = z(r.substring(i + 1, s !== -1 ? s : r.length), t), c.paramsString !== "" && (a += "?" + c.paramsString), s !== -1 && (a += r.substring(s))) : e.responseMode === "fragment" && s !== -1 && (a = r.substring(0, s), c = z(r.substring(s + 1), t), c.paramsString !== "" && (a += "#" + c.paramsString)), c && c.oauthParams) {
|
|
437
439
|
if (e.flow === "standard" || e.flow === "hybrid") {
|
|
438
|
-
if ((
|
|
439
|
-
return
|
|
440
|
-
} else if (e.flow === "implicit" && (
|
|
441
|
-
return
|
|
440
|
+
if ((c.oauthParams.code || c.oauthParams.error) && c.oauthParams.state)
|
|
441
|
+
return c.oauthParams.newUrl = a, c.oauthParams;
|
|
442
|
+
} else if (e.flow === "implicit" && (c.oauthParams.access_token || c.oauthParams.error) && c.oauthParams.state)
|
|
443
|
+
return c.oauthParams.newUrl = a, c.oauthParams;
|
|
442
444
|
}
|
|
443
445
|
}
|
|
444
|
-
function
|
|
445
|
-
for (var
|
|
446
|
+
function z(r, t) {
|
|
447
|
+
for (var i = r.split("&"), s = {
|
|
446
448
|
paramsString: "",
|
|
447
449
|
oauthParams: {}
|
|
448
|
-
},
|
|
449
|
-
var
|
|
450
|
-
|
|
450
|
+
}, a = 0; a < i.length; a++) {
|
|
451
|
+
var c = i[a].indexOf("="), n = i[a].slice(0, c);
|
|
452
|
+
t.indexOf(n) !== -1 ? s.oauthParams[n] = i[a].slice(c + 1) : (s.paramsString !== "" && (s.paramsString += "&"), s.paramsString += i[a]);
|
|
451
453
|
}
|
|
452
|
-
return
|
|
454
|
+
return s;
|
|
453
455
|
}
|
|
454
|
-
function
|
|
455
|
-
var
|
|
456
|
-
setSuccess: function(
|
|
457
|
-
|
|
456
|
+
function v() {
|
|
457
|
+
var r = {
|
|
458
|
+
setSuccess: function(t) {
|
|
459
|
+
r.resolve(t);
|
|
458
460
|
},
|
|
459
|
-
setError: function(
|
|
460
|
-
|
|
461
|
+
setError: function(t) {
|
|
462
|
+
r.reject(t);
|
|
461
463
|
}
|
|
462
464
|
};
|
|
463
|
-
return
|
|
464
|
-
|
|
465
|
-
}),
|
|
466
|
-
}
|
|
467
|
-
function re(
|
|
468
|
-
var
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
},
|
|
465
|
+
return r.promise = new Promise(function(t, i) {
|
|
466
|
+
r.resolve = t, r.reject = i;
|
|
467
|
+
}), r;
|
|
468
|
+
}
|
|
469
|
+
function re(r, t, i) {
|
|
470
|
+
var s = null, a = new Promise(function(c, n) {
|
|
471
|
+
s = setTimeout(function() {
|
|
472
|
+
n({ error: i });
|
|
473
|
+
}, t);
|
|
472
474
|
});
|
|
473
|
-
return Promise.race([
|
|
474
|
-
clearTimeout(
|
|
475
|
+
return Promise.race([r, a]).finally(function() {
|
|
476
|
+
clearTimeout(s);
|
|
475
477
|
});
|
|
476
478
|
}
|
|
477
|
-
function
|
|
478
|
-
var
|
|
479
|
-
if (!
|
|
480
|
-
return
|
|
481
|
-
var
|
|
482
|
-
|
|
483
|
-
var
|
|
484
|
-
|
|
479
|
+
function x() {
|
|
480
|
+
var r = v();
|
|
481
|
+
if (!h.enable || h.iframe)
|
|
482
|
+
return r.setSuccess(), r.promise;
|
|
483
|
+
var t = document.createElement("iframe");
|
|
484
|
+
h.iframe = t, t.onload = function() {
|
|
485
|
+
var a = e.endpoints.authorize();
|
|
486
|
+
a.charAt(0) === "/" ? h.iframeOrigin = Q() : h.iframeOrigin = a.substring(0, a.indexOf("/", 8)), r.setSuccess();
|
|
485
487
|
};
|
|
486
|
-
var
|
|
487
|
-
|
|
488
|
-
var
|
|
489
|
-
if (!(
|
|
490
|
-
|
|
491
|
-
for (var
|
|
492
|
-
var
|
|
493
|
-
|
|
488
|
+
var i = e.endpoints.checkSessionIframe();
|
|
489
|
+
t.setAttribute("src", i), t.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), t.setAttribute("title", "keycloak-session-iframe"), t.style.display = "none", document.body.appendChild(t);
|
|
490
|
+
var s = function(a) {
|
|
491
|
+
if (!(a.origin !== h.iframeOrigin || h.iframe.contentWindow !== a.source) && (a.data == "unchanged" || a.data == "changed" || a.data == "error")) {
|
|
492
|
+
a.data != "unchanged" && e.clearToken();
|
|
493
|
+
for (var c = h.callbackList.splice(0, h.callbackList.length), n = c.length - 1; n >= 0; --n) {
|
|
494
|
+
var o = c[n];
|
|
495
|
+
a.data == "error" ? o.setError() : o.setSuccess(a.data == "unchanged");
|
|
494
496
|
}
|
|
495
497
|
}
|
|
496
498
|
};
|
|
497
|
-
return window.addEventListener("message",
|
|
499
|
+
return window.addEventListener("message", s, !1), r.promise;
|
|
498
500
|
}
|
|
499
|
-
function
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
501
|
+
function P() {
|
|
502
|
+
h.enable && e.token && setTimeout(function() {
|
|
503
|
+
L().then(function(r) {
|
|
504
|
+
r && P();
|
|
503
505
|
});
|
|
504
|
-
},
|
|
506
|
+
}, h.interval * 1e3);
|
|
505
507
|
}
|
|
506
|
-
function
|
|
507
|
-
var
|
|
508
|
-
if (
|
|
509
|
-
var
|
|
510
|
-
|
|
511
|
-
var
|
|
512
|
-
|
|
508
|
+
function L() {
|
|
509
|
+
var r = v();
|
|
510
|
+
if (h.iframe && h.iframeOrigin) {
|
|
511
|
+
var t = e.clientId + " " + (e.sessionId ? e.sessionId : "");
|
|
512
|
+
h.callbackList.push(r);
|
|
513
|
+
var i = h.iframeOrigin;
|
|
514
|
+
h.callbackList.length == 1 && h.iframe.contentWindow.postMessage(t, i);
|
|
513
515
|
} else
|
|
514
|
-
|
|
515
|
-
return
|
|
516
|
-
}
|
|
517
|
-
function
|
|
518
|
-
var
|
|
519
|
-
if ((
|
|
520
|
-
var
|
|
521
|
-
|
|
522
|
-
var
|
|
523
|
-
|
|
516
|
+
r.setSuccess();
|
|
517
|
+
return r.promise;
|
|
518
|
+
}
|
|
519
|
+
function te() {
|
|
520
|
+
var r = v();
|
|
521
|
+
if ((h.enable || e.silentCheckSsoRedirectUri) && typeof e.endpoints.thirdPartyCookiesIframe == "function") {
|
|
522
|
+
var t = document.createElement("iframe");
|
|
523
|
+
t.setAttribute("src", e.endpoints.thirdPartyCookiesIframe()), t.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), t.setAttribute("title", "keycloak-3p-check-iframe"), t.style.display = "none", document.body.appendChild(t);
|
|
524
|
+
var i = function(s) {
|
|
525
|
+
t.contentWindow === s.source && (s.data !== "supported" && s.data !== "unsupported" || (s.data === "unsupported" && (A(
|
|
524
526
|
`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
525
527
|
|
|
526
528
|
- It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
|
|
527
529
|
- It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
|
|
528
530
|
|
|
529
531
|
For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers`
|
|
530
|
-
),
|
|
532
|
+
), h.enable = !1, e.silentCheckSsoFallback && (e.silentCheckSsoRedirectUri = !1)), document.body.removeChild(t), window.removeEventListener("message", i), r.setSuccess()));
|
|
531
533
|
};
|
|
532
|
-
window.addEventListener("message",
|
|
534
|
+
window.addEventListener("message", i, !1);
|
|
533
535
|
} else
|
|
534
|
-
|
|
535
|
-
return re(
|
|
536
|
+
r.setSuccess();
|
|
537
|
+
return re(r.promise, e.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
|
|
536
538
|
}
|
|
537
|
-
function
|
|
538
|
-
if (!
|
|
539
|
+
function M(r) {
|
|
540
|
+
if (!r || r == "default")
|
|
539
541
|
return {
|
|
540
|
-
login: async function(
|
|
541
|
-
return window.location.assign(await e.createLoginUrl(
|
|
542
|
+
login: async function(n) {
|
|
543
|
+
return window.location.assign(await e.createLoginUrl(n)), v().promise;
|
|
542
544
|
},
|
|
543
|
-
logout: async function(
|
|
544
|
-
if (((
|
|
545
|
-
window.location.replace(e.createLogoutUrl(
|
|
545
|
+
logout: async function(n) {
|
|
546
|
+
if (((n == null ? void 0 : n.logoutMethod) ?? e.logoutMethod) === "GET") {
|
|
547
|
+
window.location.replace(e.createLogoutUrl(n));
|
|
546
548
|
return;
|
|
547
549
|
}
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
const
|
|
550
|
+
const u = document.createElement("form");
|
|
551
|
+
u.setAttribute("method", "POST"), u.setAttribute("action", e.createLogoutUrl(n)), u.style.display = "none";
|
|
552
|
+
const f = {
|
|
551
553
|
id_token_hint: e.idToken,
|
|
552
554
|
client_id: e.clientId,
|
|
553
|
-
post_logout_redirect_uri:
|
|
555
|
+
post_logout_redirect_uri: p.redirectUri(n, !1)
|
|
554
556
|
};
|
|
555
|
-
for (const [
|
|
556
|
-
const
|
|
557
|
-
|
|
557
|
+
for (const [d, g] of Object.entries(f)) {
|
|
558
|
+
const y = document.createElement("input");
|
|
559
|
+
y.setAttribute("type", "hidden"), y.setAttribute("name", d), y.setAttribute("value", g), u.appendChild(y);
|
|
558
560
|
}
|
|
559
|
-
document.body.appendChild(
|
|
561
|
+
document.body.appendChild(u), u.submit();
|
|
560
562
|
},
|
|
561
|
-
register: async function(
|
|
562
|
-
return window.location.assign(await e.createRegisterUrl(
|
|
563
|
+
register: async function(n) {
|
|
564
|
+
return window.location.assign(await e.createRegisterUrl(n)), v().promise;
|
|
563
565
|
},
|
|
564
566
|
accountManagement: function() {
|
|
565
|
-
var
|
|
566
|
-
if (typeof
|
|
567
|
-
window.location.href =
|
|
567
|
+
var n = e.createAccountUrl();
|
|
568
|
+
if (typeof n < "u")
|
|
569
|
+
window.location.href = n;
|
|
568
570
|
else
|
|
569
571
|
throw "Not supported by the OIDC server";
|
|
570
|
-
return
|
|
572
|
+
return v().promise;
|
|
571
573
|
},
|
|
572
|
-
redirectUri: function(
|
|
573
|
-
return
|
|
574
|
+
redirectUri: function(n, o) {
|
|
575
|
+
return n && n.redirectUri ? n.redirectUri : e.redirectUri ? e.redirectUri : location.href;
|
|
574
576
|
}
|
|
575
577
|
};
|
|
576
|
-
if (
|
|
577
|
-
|
|
578
|
-
var
|
|
579
|
-
return window.cordova && window.cordova.InAppBrowser ? window.cordova.InAppBrowser.open(
|
|
580
|
-
},
|
|
581
|
-
return
|
|
582
|
-
return
|
|
578
|
+
if (r == "cordova") {
|
|
579
|
+
h.enable = !1;
|
|
580
|
+
var t = function(n, o, u) {
|
|
581
|
+
return window.cordova && window.cordova.InAppBrowser ? window.cordova.InAppBrowser.open(n, o, u) : window.open(n, o, u);
|
|
582
|
+
}, i = function(n) {
|
|
583
|
+
return n && n.cordovaOptions ? Object.keys(n.cordovaOptions).reduce(function(o, u) {
|
|
584
|
+
return o[u] = n.cordovaOptions[u], o;
|
|
583
585
|
}, {}) : {};
|
|
584
|
-
},
|
|
585
|
-
return Object.keys(
|
|
586
|
-
return
|
|
586
|
+
}, s = function(n) {
|
|
587
|
+
return Object.keys(n).reduce(function(o, u) {
|
|
588
|
+
return o.push(u + "=" + n[u]), o;
|
|
587
589
|
}, []).join(",");
|
|
588
|
-
},
|
|
589
|
-
var
|
|
590
|
-
return
|
|
591
|
-
},
|
|
590
|
+
}, a = function(n) {
|
|
591
|
+
var o = i(n);
|
|
592
|
+
return o.location = "no", n && n.prompt == "none" && (o.hidden = "yes"), s(o);
|
|
593
|
+
}, c = function() {
|
|
592
594
|
return e.redirectUri || "http://localhost";
|
|
593
595
|
};
|
|
594
596
|
return {
|
|
595
|
-
login: async function(
|
|
596
|
-
var
|
|
597
|
-
|
|
597
|
+
login: async function(n) {
|
|
598
|
+
var o = v(), u = a(n), f = await e.createLoginUrl(n), d = t(f, "_blank", u), g = !1, y = !1, T = function() {
|
|
599
|
+
y = !0, d.close();
|
|
598
600
|
};
|
|
599
|
-
return
|
|
600
|
-
if (
|
|
601
|
-
var
|
|
602
|
-
|
|
601
|
+
return d.addEventListener("loadstart", function(S) {
|
|
602
|
+
if (S.url.indexOf(c()) == 0) {
|
|
603
|
+
var K = E(S.url);
|
|
604
|
+
U(K, o), T(), g = !0;
|
|
603
605
|
}
|
|
604
|
-
}),
|
|
605
|
-
if (!
|
|
606
|
-
if (
|
|
607
|
-
var
|
|
608
|
-
|
|
606
|
+
}), d.addEventListener("loaderror", function(S) {
|
|
607
|
+
if (!g)
|
|
608
|
+
if (S.url.indexOf(c()) == 0) {
|
|
609
|
+
var K = E(S.url);
|
|
610
|
+
U(K, o), T(), g = !0;
|
|
609
611
|
} else
|
|
610
|
-
|
|
611
|
-
}),
|
|
612
|
-
|
|
612
|
+
o.setError(), T();
|
|
613
|
+
}), d.addEventListener("exit", function(S) {
|
|
614
|
+
y || o.setError({
|
|
613
615
|
reason: "closed_by_user"
|
|
614
616
|
});
|
|
615
|
-
}),
|
|
617
|
+
}), o.promise;
|
|
616
618
|
},
|
|
617
|
-
logout: function(
|
|
618
|
-
var
|
|
619
|
-
return
|
|
620
|
-
|
|
621
|
-
}),
|
|
622
|
-
|
|
623
|
-
}),
|
|
624
|
-
|
|
625
|
-
}),
|
|
619
|
+
logout: function(n) {
|
|
620
|
+
var o = v(), u = e.createLogoutUrl(n), f = t(u, "_blank", "location=no,hidden=yes,clearcache=yes"), d;
|
|
621
|
+
return f.addEventListener("loadstart", function(g) {
|
|
622
|
+
g.url.indexOf(c()) == 0 && f.close();
|
|
623
|
+
}), f.addEventListener("loaderror", function(g) {
|
|
624
|
+
g.url.indexOf(c()) == 0 || (d = !0), f.close();
|
|
625
|
+
}), f.addEventListener("exit", function(g) {
|
|
626
|
+
d ? o.setError() : (e.clearToken(), o.setSuccess());
|
|
627
|
+
}), o.promise;
|
|
626
628
|
},
|
|
627
|
-
register: async function(
|
|
628
|
-
var
|
|
629
|
-
return
|
|
630
|
-
if (
|
|
631
|
-
|
|
632
|
-
var
|
|
633
|
-
|
|
629
|
+
register: async function(n) {
|
|
630
|
+
var o = v(), u = await e.createRegisterUrl(), f = a(n), d = t(u, "_blank", f);
|
|
631
|
+
return d.addEventListener("loadstart", function(g) {
|
|
632
|
+
if (g.url.indexOf(c()) == 0) {
|
|
633
|
+
d.close();
|
|
634
|
+
var y = E(g.url);
|
|
635
|
+
U(y, o);
|
|
634
636
|
}
|
|
635
|
-
}),
|
|
637
|
+
}), o.promise;
|
|
636
638
|
},
|
|
637
639
|
accountManagement: function() {
|
|
638
|
-
var
|
|
639
|
-
if (typeof
|
|
640
|
-
var
|
|
641
|
-
|
|
642
|
-
|
|
640
|
+
var n = e.createAccountUrl();
|
|
641
|
+
if (typeof n < "u") {
|
|
642
|
+
var o = t(n, "_blank", "location=no");
|
|
643
|
+
o.addEventListener("loadstart", function(u) {
|
|
644
|
+
u.url.indexOf(c()) == 0 && o.close();
|
|
643
645
|
});
|
|
644
646
|
} else
|
|
645
647
|
throw "Not supported by the OIDC server";
|
|
646
648
|
},
|
|
647
|
-
redirectUri: function(
|
|
648
|
-
return
|
|
649
|
+
redirectUri: function(n) {
|
|
650
|
+
return c();
|
|
649
651
|
}
|
|
650
652
|
};
|
|
651
653
|
}
|
|
652
|
-
if (
|
|
653
|
-
return
|
|
654
|
-
login: async function(
|
|
655
|
-
var
|
|
656
|
-
return universalLinks.subscribe("keycloak", function(
|
|
654
|
+
if (r == "cordova-native")
|
|
655
|
+
return h.enable = !1, {
|
|
656
|
+
login: async function(n) {
|
|
657
|
+
var o = v(), u = await e.createLoginUrl(n);
|
|
658
|
+
return universalLinks.subscribe("keycloak", function(f) {
|
|
657
659
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
658
|
-
var
|
|
659
|
-
|
|
660
|
-
}), window.cordova.plugins.browsertab.openUrl(
|
|
660
|
+
var d = E(f.url);
|
|
661
|
+
U(d, o);
|
|
662
|
+
}), window.cordova.plugins.browsertab.openUrl(u), o.promise;
|
|
661
663
|
},
|
|
662
|
-
logout: function(
|
|
663
|
-
var
|
|
664
|
-
return universalLinks.subscribe("keycloak", function(
|
|
665
|
-
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close(), e.clearToken(),
|
|
666
|
-
}), window.cordova.plugins.browsertab.openUrl(
|
|
664
|
+
logout: function(n) {
|
|
665
|
+
var o = v(), u = e.createLogoutUrl(n);
|
|
666
|
+
return universalLinks.subscribe("keycloak", function(f) {
|
|
667
|
+
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close(), e.clearToken(), o.setSuccess();
|
|
668
|
+
}), window.cordova.plugins.browsertab.openUrl(u), o.promise;
|
|
667
669
|
},
|
|
668
|
-
register: async function(
|
|
669
|
-
var
|
|
670
|
-
return universalLinks.subscribe("keycloak", function(
|
|
670
|
+
register: async function(n) {
|
|
671
|
+
var o = v(), u = await e.createRegisterUrl(n);
|
|
672
|
+
return universalLinks.subscribe("keycloak", function(f) {
|
|
671
673
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
672
|
-
var
|
|
673
|
-
|
|
674
|
-
}), window.cordova.plugins.browsertab.openUrl(
|
|
674
|
+
var d = E(f.url);
|
|
675
|
+
U(d, o);
|
|
676
|
+
}), window.cordova.plugins.browsertab.openUrl(u), o.promise;
|
|
675
677
|
},
|
|
676
678
|
accountManagement: function() {
|
|
677
|
-
var
|
|
678
|
-
if (typeof
|
|
679
|
-
window.cordova.plugins.browsertab.openUrl(
|
|
679
|
+
var n = e.createAccountUrl();
|
|
680
|
+
if (typeof n < "u")
|
|
681
|
+
window.cordova.plugins.browsertab.openUrl(n);
|
|
680
682
|
else
|
|
681
683
|
throw "Not supported by the OIDC server";
|
|
682
684
|
},
|
|
683
|
-
redirectUri: function(
|
|
684
|
-
return
|
|
685
|
+
redirectUri: function(n) {
|
|
686
|
+
return n && n.redirectUri ? n.redirectUri : e.redirectUri ? e.redirectUri : "http://localhost";
|
|
685
687
|
}
|
|
686
688
|
};
|
|
687
|
-
throw "invalid adapter type: " +
|
|
689
|
+
throw "invalid adapter type: " + r;
|
|
688
690
|
}
|
|
689
|
-
const
|
|
690
|
-
var
|
|
691
|
-
if (!(this instanceof
|
|
692
|
-
return new
|
|
691
|
+
const I = "kc-callback-";
|
|
692
|
+
var H = function() {
|
|
693
|
+
if (!(this instanceof H))
|
|
694
|
+
return new H();
|
|
693
695
|
localStorage.setItem("kc-test", "test"), localStorage.removeItem("kc-test");
|
|
694
|
-
var
|
|
695
|
-
function
|
|
696
|
-
const
|
|
697
|
-
for (const [
|
|
698
|
-
const
|
|
699
|
-
(
|
|
696
|
+
var r = this;
|
|
697
|
+
function t() {
|
|
698
|
+
const c = Date.now();
|
|
699
|
+
for (const [n, o] of s()) {
|
|
700
|
+
const u = a(o);
|
|
701
|
+
(u === null || u < c) && localStorage.removeItem(n);
|
|
700
702
|
}
|
|
701
703
|
}
|
|
702
|
-
function
|
|
703
|
-
for (const [
|
|
704
|
-
localStorage.removeItem(
|
|
704
|
+
function i() {
|
|
705
|
+
for (const [c] of s())
|
|
706
|
+
localStorage.removeItem(c);
|
|
705
707
|
}
|
|
706
|
-
function
|
|
707
|
-
return Object.entries(localStorage).filter(([
|
|
708
|
+
function s() {
|
|
709
|
+
return Object.entries(localStorage).filter(([c]) => c.startsWith(I));
|
|
708
710
|
}
|
|
709
|
-
function
|
|
710
|
-
let
|
|
711
|
+
function a(c) {
|
|
712
|
+
let n;
|
|
711
713
|
try {
|
|
712
|
-
|
|
714
|
+
n = JSON.parse(c);
|
|
713
715
|
} catch {
|
|
714
716
|
return null;
|
|
715
717
|
}
|
|
716
|
-
return
|
|
718
|
+
return O(n) && "expires" in n && typeof n.expires == "number" ? n.expires : null;
|
|
717
719
|
}
|
|
718
|
-
|
|
719
|
-
if (
|
|
720
|
-
var
|
|
721
|
-
return
|
|
720
|
+
r.get = function(c) {
|
|
721
|
+
if (c) {
|
|
722
|
+
var n = I + c, o = localStorage.getItem(n);
|
|
723
|
+
return o && (localStorage.removeItem(n), o = JSON.parse(o)), t(), o;
|
|
722
724
|
}
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
...
|
|
725
|
+
}, r.add = function(c) {
|
|
726
|
+
t();
|
|
727
|
+
const n = I + c.state, o = JSON.stringify({
|
|
728
|
+
...c,
|
|
727
729
|
// Set the expiry time to 1 hour from now.
|
|
728
730
|
expires: Date.now() + 60 * 60 * 1e3
|
|
729
731
|
});
|
|
730
732
|
try {
|
|
731
|
-
localStorage.setItem(
|
|
733
|
+
localStorage.setItem(n, o);
|
|
732
734
|
} catch {
|
|
733
|
-
|
|
735
|
+
i(), localStorage.setItem(n, o);
|
|
734
736
|
}
|
|
735
737
|
};
|
|
736
|
-
},
|
|
737
|
-
if (!(this instanceof
|
|
738
|
-
return new
|
|
739
|
-
var
|
|
740
|
-
|
|
741
|
-
if (
|
|
742
|
-
var
|
|
743
|
-
if (
|
|
744
|
-
return JSON.parse(
|
|
738
|
+
}, N = function() {
|
|
739
|
+
if (!(this instanceof N))
|
|
740
|
+
return new N();
|
|
741
|
+
var r = this;
|
|
742
|
+
r.get = function(a) {
|
|
743
|
+
if (a) {
|
|
744
|
+
var c = i(I + a);
|
|
745
|
+
if (s(I + a, "", t(-100)), c)
|
|
746
|
+
return JSON.parse(c);
|
|
745
747
|
}
|
|
746
|
-
},
|
|
747
|
-
|
|
748
|
-
},
|
|
749
|
-
|
|
748
|
+
}, r.add = function(a) {
|
|
749
|
+
s(I + a.state, JSON.stringify(a), t(60));
|
|
750
|
+
}, r.removeItem = function(a) {
|
|
751
|
+
s(a, "", t(-100));
|
|
750
752
|
};
|
|
751
|
-
var
|
|
752
|
-
var
|
|
753
|
-
return
|
|
754
|
-
},
|
|
755
|
-
for (var
|
|
756
|
-
for (var
|
|
757
|
-
|
|
758
|
-
if (
|
|
759
|
-
return
|
|
753
|
+
var t = function(a) {
|
|
754
|
+
var c = /* @__PURE__ */ new Date();
|
|
755
|
+
return c.setTime(c.getTime() + a * 60 * 1e3), c;
|
|
756
|
+
}, i = function(a) {
|
|
757
|
+
for (var c = a + "=", n = document.cookie.split(";"), o = 0; o < n.length; o++) {
|
|
758
|
+
for (var u = n[o]; u.charAt(0) == " "; )
|
|
759
|
+
u = u.substring(1);
|
|
760
|
+
if (u.indexOf(c) == 0)
|
|
761
|
+
return u.substring(c.length, u.length);
|
|
760
762
|
}
|
|
761
763
|
return "";
|
|
762
|
-
},
|
|
763
|
-
var
|
|
764
|
-
document.cookie =
|
|
764
|
+
}, s = function(a, c, n) {
|
|
765
|
+
var o = a + "=" + c + "; expires=" + n.toUTCString() + "; ";
|
|
766
|
+
document.cookie = o;
|
|
765
767
|
};
|
|
766
768
|
};
|
|
767
|
-
function
|
|
769
|
+
function ne() {
|
|
768
770
|
try {
|
|
769
|
-
return new
|
|
771
|
+
return new H();
|
|
770
772
|
} catch {
|
|
771
773
|
}
|
|
772
|
-
return new
|
|
774
|
+
return new N();
|
|
773
775
|
}
|
|
774
|
-
function
|
|
776
|
+
function Y(r) {
|
|
775
777
|
return function() {
|
|
776
|
-
e.enableLogging &&
|
|
778
|
+
e.enableLogging && r.apply(console, Array.prototype.slice.call(arguments));
|
|
777
779
|
};
|
|
778
780
|
}
|
|
779
781
|
}
|
|
780
|
-
function
|
|
781
|
-
const e = String.fromCodePoint(...
|
|
782
|
+
function se(k) {
|
|
783
|
+
const e = String.fromCodePoint(...k);
|
|
782
784
|
return btoa(e);
|
|
783
785
|
}
|
|
784
|
-
async function
|
|
785
|
-
const
|
|
786
|
+
async function ie(k) {
|
|
787
|
+
const p = new TextEncoder().encode(k);
|
|
786
788
|
if (typeof crypto > "u" || typeof crypto.subtle > "u")
|
|
787
789
|
throw new Error("Web Crypto API is not available.");
|
|
788
|
-
return await crypto.subtle.digest("SHA-256",
|
|
790
|
+
return await crypto.subtle.digest("SHA-256", p);
|
|
789
791
|
}
|
|
790
|
-
function
|
|
791
|
-
const [e,
|
|
792
|
-
if (typeof
|
|
792
|
+
function D(k) {
|
|
793
|
+
const [e, p] = k.split(".");
|
|
794
|
+
if (typeof p != "string")
|
|
793
795
|
throw new Error("Unable to decode token, payload not found.");
|
|
794
|
-
let
|
|
796
|
+
let m;
|
|
795
797
|
try {
|
|
796
|
-
|
|
797
|
-
} catch (
|
|
798
|
-
throw new Error("Unable to decode token, payload is not a valid Base64URL value.", { cause:
|
|
798
|
+
m = ce(p);
|
|
799
|
+
} catch (l) {
|
|
800
|
+
throw new Error("Unable to decode token, payload is not a valid Base64URL value.", { cause: l });
|
|
799
801
|
}
|
|
800
802
|
try {
|
|
801
|
-
return JSON.parse(
|
|
802
|
-
} catch (
|
|
803
|
-
throw new Error("Unable to decode token, payload is not a valid JSON value.", { cause:
|
|
803
|
+
return JSON.parse(m);
|
|
804
|
+
} catch (l) {
|
|
805
|
+
throw new Error("Unable to decode token, payload is not a valid JSON value.", { cause: l });
|
|
804
806
|
}
|
|
805
807
|
}
|
|
806
|
-
function
|
|
807
|
-
let e =
|
|
808
|
+
function ce(k) {
|
|
809
|
+
let e = k.replaceAll("-", "+").replaceAll("_", "/");
|
|
808
810
|
switch (e.length % 4) {
|
|
809
811
|
case 0:
|
|
810
812
|
break;
|
|
@@ -818,28 +820,28 @@ function Bn(t) {
|
|
|
818
820
|
throw new Error("Input is not of the correct length.");
|
|
819
821
|
}
|
|
820
822
|
try {
|
|
821
|
-
return
|
|
823
|
+
return ue(e);
|
|
822
824
|
} catch {
|
|
823
825
|
return atob(e);
|
|
824
826
|
}
|
|
825
827
|
}
|
|
826
|
-
function
|
|
827
|
-
return decodeURIComponent(atob(
|
|
828
|
-
let
|
|
829
|
-
return
|
|
828
|
+
function ue(k) {
|
|
829
|
+
return decodeURIComponent(atob(k).replace(/(.)/g, (e, p) => {
|
|
830
|
+
let m = p.charCodeAt(0).toString(16).toUpperCase();
|
|
831
|
+
return m.length < 2 && (m = "0" + m), "%" + m;
|
|
830
832
|
}));
|
|
831
833
|
}
|
|
832
|
-
function
|
|
833
|
-
return typeof
|
|
834
|
+
function O(k) {
|
|
835
|
+
return typeof k == "object" && k !== null;
|
|
834
836
|
}
|
|
835
|
-
const
|
|
836
|
-
class
|
|
837
|
+
const le = {};
|
|
838
|
+
class j extends q {
|
|
837
839
|
constructor() {
|
|
838
|
-
const { VITE_KEYCLOAK_REALM: e, VITE_KEYCLOAK_HOST:
|
|
840
|
+
const { VITE_KEYCLOAK_REALM: e, VITE_KEYCLOAK_HOST: p, VITE_KEYCLOAK_CLIENT_ID: m } = le;
|
|
839
841
|
super({
|
|
840
|
-
url:
|
|
842
|
+
url: p,
|
|
841
843
|
realm: e,
|
|
842
|
-
clientId:
|
|
844
|
+
clientId: m
|
|
843
845
|
});
|
|
844
846
|
}
|
|
845
847
|
async initialize() {
|
|
@@ -854,7 +856,7 @@ class xt extends en {
|
|
|
854
856
|
}
|
|
855
857
|
}
|
|
856
858
|
static async init() {
|
|
857
|
-
const e = new
|
|
859
|
+
const e = new j();
|
|
858
860
|
return await e.initialize(), e;
|
|
859
861
|
}
|
|
860
862
|
get userInfo() {
|
|
@@ -867,2265 +869,96 @@ class xt extends en {
|
|
|
867
869
|
return this.authenticated ?? !1;
|
|
868
870
|
}
|
|
869
871
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
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)), {
|
|
872
|
+
const de = "GHENT_CDH_AUTH_STORE", fe = G(de, () => {
|
|
873
|
+
const k = oe(!1), e = F(), p = F(!1);
|
|
874
|
+
return j.init().then((l) => (k.value = l.isAuthenticated, e.value = l, p.value = !0, l)), {
|
|
3042
875
|
token: () => {
|
|
3043
|
-
var
|
|
3044
|
-
return (
|
|
876
|
+
var l;
|
|
877
|
+
return (l = e.value) == null ? void 0 : l.token;
|
|
3045
878
|
},
|
|
3046
879
|
user: () => {
|
|
3047
|
-
var
|
|
3048
|
-
return (
|
|
880
|
+
var l;
|
|
881
|
+
return (l = e.value) == null ? void 0 : l.userInfo;
|
|
3049
882
|
},
|
|
3050
883
|
isAuthenticated: () => {
|
|
3051
|
-
var
|
|
3052
|
-
return (
|
|
884
|
+
var l;
|
|
885
|
+
return (l = e.value) == null ? void 0 : l.isAuthenticated;
|
|
3053
886
|
},
|
|
3054
887
|
logout: () => {
|
|
3055
888
|
console.warn("logout");
|
|
3056
889
|
},
|
|
3057
890
|
updateToken: async () => {
|
|
3058
|
-
var
|
|
3059
|
-
return
|
|
3060
|
-
const
|
|
3061
|
-
|
|
891
|
+
var l;
|
|
892
|
+
return p.value || await new Promise((h) => {
|
|
893
|
+
const b = ae(p, (w) => {
|
|
894
|
+
w && (b(), h());
|
|
3062
895
|
});
|
|
3063
|
-
}), (
|
|
896
|
+
}), (l = e.value) == null ? void 0 : l.updateToken();
|
|
3064
897
|
}
|
|
3065
898
|
};
|
|
3066
|
-
}),
|
|
3067
|
-
const
|
|
3068
|
-
const
|
|
899
|
+
}), pe = "GHENT_CDH_HTTP_REQUEST", ke = G(pe, () => {
|
|
900
|
+
const k = fe(), e = async (p, m, l = { contentType: "application/json" }) => {
|
|
901
|
+
const h = {
|
|
3069
902
|
accept: "application/json",
|
|
3070
|
-
...
|
|
903
|
+
...m.headers ?? {}
|
|
3071
904
|
};
|
|
3072
|
-
|
|
3073
|
-
const
|
|
3074
|
-
if (
|
|
3075
|
-
for (const [
|
|
3076
|
-
|
|
3077
|
-
const
|
|
3078
|
-
...
|
|
3079
|
-
headers:
|
|
905
|
+
l.contentType && (h["Content-Type"] = l.contentType), l != null && l.skipAuth || (await k.updateToken(), h.Authorization = `Bearer ${k.token()}`);
|
|
906
|
+
const b = new URL(p, window.location.href);
|
|
907
|
+
if (l != null && l.queryParams)
|
|
908
|
+
for (const [A, R] of Object.entries(l.queryParams))
|
|
909
|
+
b.searchParams.set(A, R);
|
|
910
|
+
const w = await fetch(b.toString(), {
|
|
911
|
+
...m,
|
|
912
|
+
headers: h
|
|
3080
913
|
});
|
|
3081
|
-
return
|
|
3082
|
-
content:
|
|
3083
|
-
status:
|
|
914
|
+
return w.ok ? w.json() : (l != null && l.skipAuth, Promise.reject({
|
|
915
|
+
content: w.body,
|
|
916
|
+
status: w.status
|
|
3084
917
|
}));
|
|
3085
918
|
};
|
|
3086
919
|
return {
|
|
3087
|
-
get: (
|
|
3088
|
-
postFile: (
|
|
3089
|
-
const
|
|
3090
|
-
for (const
|
|
3091
|
-
|
|
3092
|
-
return
|
|
3093
|
-
|
|
920
|
+
get: (p, m) => e(p, { method: "GET" }, m),
|
|
921
|
+
postFile: (p, m, l = {}, h) => {
|
|
922
|
+
const b = new FormData();
|
|
923
|
+
for (const w in l)
|
|
924
|
+
b.append(w, l[w]);
|
|
925
|
+
return b.append("file", m), e(
|
|
926
|
+
p,
|
|
3094
927
|
{
|
|
3095
928
|
method: "POST",
|
|
3096
|
-
body:
|
|
929
|
+
body: b
|
|
3097
930
|
},
|
|
3098
|
-
{ ...
|
|
931
|
+
{ ...h, contentType: void 0 }
|
|
3099
932
|
);
|
|
3100
933
|
},
|
|
3101
|
-
post: (
|
|
3102
|
-
|
|
934
|
+
post: (p, m, l) => e(
|
|
935
|
+
p,
|
|
3103
936
|
{
|
|
3104
937
|
method: "POST",
|
|
3105
|
-
body: JSON.stringify(
|
|
938
|
+
body: JSON.stringify(m)
|
|
3106
939
|
},
|
|
3107
|
-
|
|
940
|
+
l
|
|
3108
941
|
),
|
|
3109
|
-
patch: (
|
|
3110
|
-
|
|
942
|
+
patch: (p, m, l) => e(
|
|
943
|
+
p,
|
|
3111
944
|
{
|
|
3112
945
|
method: "PATCH",
|
|
3113
|
-
body: JSON.stringify(
|
|
946
|
+
body: JSON.stringify(m)
|
|
3114
947
|
},
|
|
3115
|
-
|
|
948
|
+
l
|
|
3116
949
|
),
|
|
3117
|
-
delete: (
|
|
3118
|
-
|
|
950
|
+
delete: (p, m, l) => e(
|
|
951
|
+
p,
|
|
3119
952
|
{
|
|
3120
953
|
method: "DELETE",
|
|
3121
|
-
body: JSON.stringify(
|
|
954
|
+
body: JSON.stringify(m)
|
|
3122
955
|
},
|
|
3123
|
-
|
|
956
|
+
l
|
|
3124
957
|
)
|
|
3125
958
|
};
|
|
3126
959
|
});
|
|
3127
960
|
export {
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
961
|
+
j as KeycloakAdapter,
|
|
962
|
+
fe as useAuthenticationStore,
|
|
963
|
+
ke as useHttpStore
|
|
3131
964
|
};
|