@burdenoff/fe-libs 2026.529.2 → 2026.529.3
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/dist/shared/graphql/client.d.ts.map +1 -1
- package/dist/shared/graphql/client.js +95 -83
- package/dist/shared/graphql/fetch.d.ts.map +1 -1
- package/dist/shared/graphql/fetch.js +130 -107
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +215 -181
- package/dist/shared/tours/toursContext/useTourMutations.js +29 -29
- package/dist/shared/utils/backendErrors.d.ts.map +1 -1
- package/dist/shared/utils/backendErrors.js +121 -0
- package/dist/shared/utils/index.d.ts +4 -2
- package/dist/shared/utils/index.d.ts.map +1 -1
- package/dist/shared/utils/quotaErrors.js +11 -8
- package/dist/shared-tours.js +3 -3
- package/dist/shared-utils.js +12 -11
- package/dist/shared.js +96 -95
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/shared/graphql/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGZ,aAAa,EAId,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAiB,KAAK,OAAO,EAAY,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/shared/graphql/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGZ,aAAa,EAId,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAiB,KAAK,OAAO,EAAY,MAAM,WAAW,CAAC;AAmDlE;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAUD,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OA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AAC;IACxC,yEAAyE;IACzE,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACrD,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAmFD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,gBAuf/D;AASD,MAAM,WAAW,eAAe;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CA0BlE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAKjD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAK9C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAStC"}
|
|
@@ -1,150 +1,151 @@
|
|
|
1
1
|
import { GATEWAYS as e, getGatewayUrl as t } from "../../shared-config.js";
|
|
2
2
|
import { validateGatewayBaseUrl as n } from "./security.js";
|
|
3
3
|
import { isWorkspaceTokenValidForContext as r } from "./workspaceToken.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { dispatchBackendErrorEvent as i } from "../utils/backendErrors.js";
|
|
5
|
+
import { enqueueGraphQLFetch as a } from "./fetch.js";
|
|
6
|
+
import { SSELink as o } from "./links/sse-link.js";
|
|
7
|
+
import { onError as s } from "@apollo/client/link/error";
|
|
8
|
+
import { RetryLink as c } from "@apollo/client/link/retry";
|
|
9
|
+
import { setContext as l } from "@apollo/client/link/context";
|
|
10
|
+
import { ApolloClient as u, ApolloLink as d, InMemoryCache as f, Observable as p, from as m, split as ee } from "@apollo/client/core";
|
|
10
11
|
import { getMainDefinition as te } from "@apollo/client/utilities";
|
|
11
|
-
import { print as
|
|
12
|
+
import { print as h } from "graphql";
|
|
12
13
|
//#region src/shared/graphql/client.ts
|
|
13
|
-
var
|
|
14
|
+
var g = {
|
|
14
15
|
consecutiveFailures: 0,
|
|
15
16
|
lastFailureTime: 0,
|
|
16
17
|
isOpen: !1
|
|
17
|
-
},
|
|
18
|
+
}, _ = 5, v = 3e4;
|
|
18
19
|
function ne() {
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
function v() {
|
|
22
|
-
h.consecutiveFailures = 0, h.isOpen = !1;
|
|
20
|
+
return g.consecutiveFailures++, g.lastFailureTime = Date.now(), g.consecutiveFailures >= _ && (g.isOpen = !0), g.isOpen;
|
|
23
21
|
}
|
|
24
22
|
function y() {
|
|
25
|
-
|
|
23
|
+
g.consecutiveFailures = 0, g.isOpen = !1;
|
|
24
|
+
}
|
|
25
|
+
function b() {
|
|
26
|
+
return g.isOpen ? Date.now() - g.lastFailureTime > v ? (g.isOpen = !1, g.consecutiveFailures = 0, !1) : !0 : !1;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function x(e) {
|
|
28
29
|
if (!e || typeof e != "object") return null;
|
|
29
30
|
let t = e.workspaceId;
|
|
30
31
|
return typeof t == "string" && t.trim() ? t : null;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function S(e) {
|
|
33
34
|
let t = e.headers;
|
|
34
35
|
if (!t || typeof t != "object" || Array.isArray(t)) return {};
|
|
35
36
|
let n = {};
|
|
36
37
|
for (let [e, r] of Object.entries(t)) typeof r == "string" && (n[e] = r);
|
|
37
38
|
return n;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function C(e) {
|
|
40
41
|
let t = e.fetchOptions;
|
|
41
42
|
if (!t || typeof t != "object" || !("signal" in t)) return;
|
|
42
43
|
let n = t.signal;
|
|
43
44
|
return n instanceof AbortSignal ? n : void 0;
|
|
44
45
|
}
|
|
45
46
|
function re({ uri: e, batchMax: t, batchInterval: n }) {
|
|
46
|
-
return new
|
|
47
|
-
let o = r.getContext(), s = { query:
|
|
47
|
+
return new d((r) => new p((i) => {
|
|
48
|
+
let o = r.getContext(), s = { query: h(r.query) };
|
|
48
49
|
r.operationName && (s.operationName = r.operationName);
|
|
49
50
|
let c = r.variables ?? {}, l = r.extensions ?? {};
|
|
50
51
|
Object.keys(c).length > 0 && (s.variables = c), Object.keys(l).length > 0 && (s.extensions = l);
|
|
51
52
|
let u = !1;
|
|
52
|
-
return
|
|
53
|
+
return a(e, {
|
|
53
54
|
"content-type": "application/json",
|
|
54
|
-
...
|
|
55
|
-
}, s,
|
|
55
|
+
...S(o)
|
|
56
|
+
}, s, C(o), {
|
|
56
57
|
batchMax: t,
|
|
57
58
|
batchInterval: n
|
|
58
59
|
}).then((e) => {
|
|
59
|
-
u || (
|
|
60
|
+
u || (i.next(e), i.complete());
|
|
60
61
|
}).catch((e) => {
|
|
61
|
-
u ||
|
|
62
|
+
u || i.error(e);
|
|
62
63
|
}), () => {
|
|
63
64
|
u = !0;
|
|
64
65
|
};
|
|
65
66
|
}));
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
-
let { gateway:
|
|
69
|
-
uri: n(t(
|
|
70
|
-
batchMax:
|
|
71
|
-
batchInterval:
|
|
72
|
-
}), z =
|
|
73
|
-
let n = t.headers ?? {}, r = typeof
|
|
68
|
+
function w(a) {
|
|
69
|
+
let { gateway: h, baseUrl: _, authToken: v, workspaceToken: S, locale: C, geography: w, organizationId: T, productId: E, workspaceId: D, tenantId: O, cache: k, enableSubscriptions: A = !1, sseUrl: j, onAuthError: M, onRefreshToken: N, onNetworkError: P, onNetworkStatusChange: F, maxRetryAttempts: ie = 3, batchMax: ae = 10, batchInterval: oe, debug: I = !1 } = a, L = e[h], R = re({
|
|
70
|
+
uri: n(t(_, h)),
|
|
71
|
+
batchMax: ae,
|
|
72
|
+
batchInterval: oe
|
|
73
|
+
}), z = l((e, t) => {
|
|
74
|
+
let n = t.headers ?? {}, r = typeof v == "function" ? v() : v;
|
|
74
75
|
return { headers: {
|
|
75
76
|
...n,
|
|
76
77
|
...r ? { authorization: `Bearer ${r}` } : {}
|
|
77
78
|
} };
|
|
78
|
-
}), B =
|
|
79
|
-
let n = t.headers ?? {}, r = typeof
|
|
79
|
+
}), B = l((e, t) => {
|
|
80
|
+
let n = t.headers ?? {}, r = typeof C == "function" ? C() : C;
|
|
80
81
|
return { headers: {
|
|
81
82
|
...n,
|
|
82
83
|
...r ? { "accept-language": r } : {}
|
|
83
84
|
} };
|
|
84
|
-
}), V =
|
|
85
|
-
let n = t.headers ?? {}, r = typeof
|
|
85
|
+
}), V = l((e, t) => {
|
|
86
|
+
let n = t.headers ?? {}, r = typeof w == "function" ? w() : null;
|
|
86
87
|
return { headers: {
|
|
87
88
|
...n,
|
|
88
89
|
...r?.country ? { "x-geo-country": r.country } : {},
|
|
89
90
|
...r?.currency ? { "x-geo-currency": r.currency } : {},
|
|
90
91
|
...r?.timezone ? { "x-geo-timezone": r.timezone } : {}
|
|
91
92
|
} };
|
|
92
|
-
}), H =
|
|
93
|
-
let n = t.headers ?? {}, r = typeof
|
|
93
|
+
}), H = l((e, t) => {
|
|
94
|
+
let n = t.headers ?? {}, r = typeof T == "function" ? T() : T;
|
|
94
95
|
return { headers: {
|
|
95
96
|
...n,
|
|
96
97
|
...r ? { "x-org-id": r } : {}
|
|
97
98
|
} };
|
|
98
|
-
}), U =
|
|
99
|
-
let n = t.headers ?? {}, r = typeof
|
|
99
|
+
}), U = l((e, t) => {
|
|
100
|
+
let n = t.headers ?? {}, r = typeof E == "function" ? E() : E;
|
|
100
101
|
return { headers: {
|
|
101
102
|
...n,
|
|
102
103
|
...r ? { "x-product-id": r } : {}
|
|
103
104
|
} };
|
|
104
|
-
}), W =
|
|
105
|
-
let n = t.headers ?? {}, r = (typeof
|
|
105
|
+
}), W = l((e, t) => {
|
|
106
|
+
let n = t.headers ?? {}, r = (typeof D == "function" ? D() : D) || x(e.variables);
|
|
106
107
|
return { headers: {
|
|
107
108
|
...n,
|
|
108
109
|
...r ? { "x-workspace-id": r } : {}
|
|
109
110
|
} };
|
|
110
|
-
}), G =
|
|
111
|
-
let n = t.headers ?? {}, r = typeof
|
|
111
|
+
}), G = l((e, t) => {
|
|
112
|
+
let n = t.headers ?? {}, r = typeof O == "function" ? O() : O;
|
|
112
113
|
return { headers: {
|
|
113
114
|
...n,
|
|
114
115
|
...r ? { "x-tenant-id": r } : {}
|
|
115
116
|
} };
|
|
116
|
-
}), K =
|
|
117
|
-
let n = t.headers ?? {}, i = typeof
|
|
117
|
+
}), K = l((e, t) => {
|
|
118
|
+
let n = t.headers ?? {}, i = typeof S == "function" ? S() : S, a = r(i, { workspaceId: typeof D == "function" ? D() : D }) ? i : null;
|
|
118
119
|
return { headers: {
|
|
119
120
|
...n,
|
|
120
121
|
...a ? { "x-workspace-authorization": `Bearer ${a}` } : {}
|
|
121
122
|
} };
|
|
122
|
-
}), q = new
|
|
123
|
+
}), q = new c({
|
|
123
124
|
delay: {
|
|
124
125
|
initial: 1e3,
|
|
125
126
|
max: 8e3,
|
|
126
127
|
jitter: !0
|
|
127
128
|
},
|
|
128
129
|
attempts: {
|
|
129
|
-
max:
|
|
130
|
+
max: ie,
|
|
130
131
|
retryIf: (e) => {
|
|
131
|
-
if (
|
|
132
|
+
if (b() || !e) return !1;
|
|
132
133
|
let t = e.message?.toLowerCase?.() ?? "";
|
|
133
134
|
return !(t.includes("401") || t.includes("403") || t.includes("unauthorized") || t.includes("forbidden") || t.includes("unauthenticated"));
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
|
-
}), J = new
|
|
137
|
-
if (
|
|
137
|
+
}), J = new d((e, t) => {
|
|
138
|
+
if (b()) {
|
|
138
139
|
I && console.warn("[CircuitBreaker] Circuit is open, blocking request:", e.operationName);
|
|
139
140
|
let t = /* @__PURE__ */ Error("Network circuit breaker is open — backend appears unreachable. Retrying in 30 seconds.");
|
|
140
|
-
return
|
|
141
|
+
return P?.(t), new p((e) => {
|
|
141
142
|
e.error(t);
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
|
-
return new
|
|
145
|
+
return new p((n) => {
|
|
145
146
|
let r = t(e).subscribe({
|
|
146
147
|
next: (e) => {
|
|
147
|
-
|
|
148
|
+
y(), g.consecutiveFailures === 0 && F?.(!1), n.next(e);
|
|
148
149
|
},
|
|
149
150
|
error: (e) => {
|
|
150
151
|
n.error(e);
|
|
@@ -161,43 +162,54 @@ function C(i) {
|
|
|
161
162
|
function Z(e) {
|
|
162
163
|
X.forEach(({ resolve: t }) => t(e)), X = [];
|
|
163
164
|
}
|
|
164
|
-
let Q =
|
|
165
|
+
let Q = s(({ error: e, operation: t, forward: n }) => {
|
|
165
166
|
let r = e.errors;
|
|
166
167
|
if (r) {
|
|
167
|
-
let
|
|
168
|
+
let a = r.some((e) => e.extensions?.code === "UNAUTHENTICATED" || e.message.includes("Unauthorized") || e.message.includes("Unauthenticated"));
|
|
168
169
|
for (let e of r) I && console.error("[GraphQL Error]:", e.message);
|
|
169
|
-
|
|
170
|
+
i({ errors: r }, { operationName: t.operationName });
|
|
171
|
+
let o = new Set(["STORAGE_QUOTA_EXCEEDED", "RESOURCE_CAP_EXCEEDED"]);
|
|
170
172
|
for (let e of r) {
|
|
171
173
|
let t = e.extensions?.code;
|
|
172
|
-
if (t &&
|
|
174
|
+
if (t && o.has(t) && typeof window < "u") {
|
|
173
175
|
window.dispatchEvent(new CustomEvent("burdenoff:upgrade-prompt", { detail: { extensions: e.extensions } }));
|
|
174
176
|
break;
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
|
-
if (
|
|
179
|
+
if (a && N) return new p((r) => {
|
|
178
180
|
(async () => {
|
|
179
181
|
if (Y) if (await new Promise((e) => {
|
|
180
182
|
X.push({ resolve: e });
|
|
181
183
|
})) {
|
|
182
184
|
let e = n(t).subscribe(r);
|
|
183
185
|
return () => e.unsubscribe();
|
|
184
|
-
} else return
|
|
186
|
+
} else return M?.(), r.error(e), () => {};
|
|
185
187
|
Y = !0;
|
|
186
188
|
try {
|
|
187
|
-
let i = await
|
|
189
|
+
let i = await N();
|
|
188
190
|
if (Y = !1, i) {
|
|
189
191
|
Z(!0);
|
|
190
192
|
let e = n(t).subscribe(r);
|
|
191
193
|
return () => e.unsubscribe();
|
|
192
|
-
} else return Z(!1),
|
|
194
|
+
} else return Z(!1), M?.(), r.error(e), () => {};
|
|
193
195
|
} catch {
|
|
194
|
-
return Y = !1, Z(!1),
|
|
196
|
+
return Y = !1, Z(!1), M?.(), r.error(e), () => {};
|
|
195
197
|
}
|
|
196
198
|
})();
|
|
197
199
|
});
|
|
198
|
-
|
|
199
|
-
} else I && console.error("[Network Error]:", e), ne() &&
|
|
200
|
-
|
|
200
|
+
a && M?.(), y();
|
|
201
|
+
} else if (I && console.error("[Network Error]:", e), ne() && F?.(!0), e instanceof Error) P?.(e), i(e, {
|
|
202
|
+
operationName: t.operationName,
|
|
203
|
+
fallbackMessage: "We could not reach the server. Please check your connection and try again."
|
|
204
|
+
});
|
|
205
|
+
else {
|
|
206
|
+
let n = Error(String(e));
|
|
207
|
+
P?.(n), i(n, {
|
|
208
|
+
operationName: t.operationName,
|
|
209
|
+
fallbackMessage: "We could not reach the server. Please check your connection and try again."
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}), $ = m([
|
|
201
213
|
q,
|
|
202
214
|
J,
|
|
203
215
|
Q,
|
|
@@ -211,9 +223,9 @@ function C(i) {
|
|
|
211
223
|
V,
|
|
212
224
|
R
|
|
213
225
|
]);
|
|
214
|
-
if (
|
|
215
|
-
let e =
|
|
216
|
-
e && ($ =
|
|
226
|
+
if (A) {
|
|
227
|
+
let e = j || n(_ || L.defaultBaseUrl) + L.sse;
|
|
228
|
+
e && ($ = m([
|
|
217
229
|
q,
|
|
218
230
|
J,
|
|
219
231
|
Q,
|
|
@@ -228,14 +240,14 @@ function C(i) {
|
|
|
228
240
|
ee(({ query: e }) => {
|
|
229
241
|
let t = te(e);
|
|
230
242
|
return t.kind === "OperationDefinition" && t.operation === "subscription";
|
|
231
|
-
}, new
|
|
243
|
+
}, new o({
|
|
232
244
|
url: e,
|
|
233
245
|
headers: {},
|
|
234
246
|
debug: I
|
|
235
247
|
}), R)
|
|
236
248
|
]));
|
|
237
249
|
}
|
|
238
|
-
let
|
|
250
|
+
let se = new f({ typePolicies: {
|
|
239
251
|
File: { keyFields: ["id"] },
|
|
240
252
|
Folder: { keyFields: ["id"] },
|
|
241
253
|
Tag: { keyFields: ["id"] },
|
|
@@ -267,9 +279,9 @@ function C(i) {
|
|
|
267
279
|
Session: { keyFields: ["id"] },
|
|
268
280
|
DeveloperOrganization: { keyFields: ["id"] }
|
|
269
281
|
} });
|
|
270
|
-
return new
|
|
282
|
+
return new u({
|
|
271
283
|
link: $,
|
|
272
|
-
cache:
|
|
284
|
+
cache: k ?? se,
|
|
273
285
|
defaultOptions: {
|
|
274
286
|
watchQuery: {
|
|
275
287
|
fetchPolicy: "cache-and-network",
|
|
@@ -283,17 +295,17 @@ function C(i) {
|
|
|
283
295
|
}
|
|
284
296
|
});
|
|
285
297
|
}
|
|
286
|
-
var
|
|
287
|
-
function
|
|
298
|
+
var T = null, E = null;
|
|
299
|
+
function D(e) {
|
|
288
300
|
let { workspaceBaseUrl: t, globalBaseUrl: n, authToken: r, enableSubscriptions: i = !1, onAuthError: a, debug: o = !1 } = e;
|
|
289
|
-
|
|
301
|
+
T = w({
|
|
290
302
|
gateway: "workspace",
|
|
291
303
|
baseUrl: t,
|
|
292
304
|
authToken: r,
|
|
293
305
|
enableSubscriptions: i,
|
|
294
306
|
onAuthError: a,
|
|
295
307
|
debug: o
|
|
296
|
-
}),
|
|
308
|
+
}), E = w({
|
|
297
309
|
gateway: "global",
|
|
298
310
|
baseUrl: n,
|
|
299
311
|
authToken: r,
|
|
@@ -301,16 +313,16 @@ function E(e) {
|
|
|
301
313
|
debug: o
|
|
302
314
|
});
|
|
303
315
|
}
|
|
304
|
-
function D() {
|
|
305
|
-
if (!w) throw Error("Workspace client not initialized. Call initializeAppClients first.");
|
|
306
|
-
return w;
|
|
307
|
-
}
|
|
308
316
|
function O() {
|
|
309
|
-
if (!T) throw Error("
|
|
317
|
+
if (!T) throw Error("Workspace client not initialized. Call initializeAppClients first.");
|
|
310
318
|
return T;
|
|
311
319
|
}
|
|
312
320
|
function k() {
|
|
313
|
-
|
|
321
|
+
if (!E) throw Error("Global client not initialized. Call initializeAppClients first.");
|
|
322
|
+
return E;
|
|
323
|
+
}
|
|
324
|
+
function A() {
|
|
325
|
+
T &&= (T.clearStore(), null), E &&= (E.clearStore(), null);
|
|
314
326
|
}
|
|
315
327
|
//#endregion
|
|
316
|
-
export {
|
|
328
|
+
export { w as createGraphQLClient, k as getGlobalClient, O as getWorkspaceClient, D as initializeAppClients, A as resetAppClients };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/shared/graphql/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/shared/graphql/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBnD,MAAM,WAAW,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