@24city/web-console 0.3.10 → 0.3.11
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/CHANGELOG.md +12 -0
- package/README.md +17 -1
- package/dist/account/account-api.d.ts +14 -0
- package/dist/account/index.d.ts +1 -0
- package/dist/account/index.js +64 -61
- package/dist/account/upgrade-modal.d.ts +3 -1
- package/dist/account/use-track.d.ts +32 -0
- package/dist/chunks/{auth-provider-7FOj7Y84.js → auth-provider-3AIfwcdS.js} +1 -1
- package/dist/chunks/console-layout-CTVkNVdl.js +214 -0
- package/dist/chunks/{logout-signal-CLdquzzn.js → logout-signal-CsnJzWTz.js} +114 -111
- package/dist/chunks/{stale-build-DwUlkKYm.js → stale-build-CpZMSNSH.js} +2 -2
- package/dist/chunks/use-show-once-mq5WGTrX.js +785 -0
- package/dist/chunks/wallet-badge-3oCaCiNm.js +629 -0
- package/dist/index.js +185 -182
- package/dist/layout/index.js +1 -1
- package/dist/runtime/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/console-layout-B4OlW1IZ.js +0 -210
- package/dist/chunks/use-show-once-Bz1ojVqb.js +0 -768
- package/dist/chunks/wallet-badge-COpdEDYI.js +0 -575
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { sanitizeInternalReturnPath as
|
|
1
|
+
import { sanitizeInternalReturnPath as A } from "@24city/web-runtime/core/internal-path";
|
|
2
2
|
import { createContext as _, useSyncExternalStore as x, useContext as F } from "react";
|
|
3
3
|
import { summarizeCustomerError as z } from "@24city/web-runtime/error-summary";
|
|
4
|
-
const
|
|
4
|
+
const v = (t) => t.includes("\\") || [...t].some((e) => {
|
|
5
5
|
const o = e.charCodeAt(0);
|
|
6
6
|
return o <= 31 || o === 127;
|
|
7
|
-
}),
|
|
7
|
+
}), it = (t) => !v(t) && t.startsWith("/") && !t.startsWith("//") && (() => {
|
|
8
8
|
try {
|
|
9
9
|
const e = new URL(t, "https://product.invalid");
|
|
10
|
-
return e.origin === "https://product.invalid" &&
|
|
10
|
+
return e.origin === "https://product.invalid" && A(t, e.pathname) === t;
|
|
11
11
|
} catch {
|
|
12
12
|
return !1;
|
|
13
13
|
}
|
|
14
|
-
})(),
|
|
14
|
+
})(), ct = (t, e) => !v(t) && A(t, e) === t, M = (t, e) => !t || v(t) ? e : A(t, e), O = (t) => typeof t == "object" && t !== null && !Array.isArray(t), l = (t, e) => {
|
|
15
15
|
const o = e.data;
|
|
16
16
|
if (!O(o) || o.code !== 0 || !("data" in o))
|
|
17
17
|
throw new Error(`接口 ${t} 返回了无效响应`);
|
|
@@ -24,12 +24,12 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
24
24
|
if (typeof r != "string" || !r.trim())
|
|
25
25
|
throw new Error(`接口 ${o} 字段 ${e} 无效`);
|
|
26
26
|
return r;
|
|
27
|
-
},
|
|
27
|
+
}, g = (t, e, o) => {
|
|
28
28
|
const r = t[e];
|
|
29
29
|
if (typeof r != "number" || !Number.isSafeInteger(r) || r < 0)
|
|
30
30
|
throw new Error(`接口 ${o} 字段 ${e} 无效`);
|
|
31
31
|
return r;
|
|
32
|
-
},
|
|
32
|
+
}, d = "/account", c = `${d}/session`, E = `${d}/logout`, i = `${d}/spaces`, T = `${i}/switch`, $ = `${d}/profile`, h = `${d}/wallet`, P = `${d}/entitlements`, f = `${d}/subscription`, a = `${d}/plans`, y = `${d}/shown-prompts`, W = `${d}/events`, I = (t, e, o) => {
|
|
33
33
|
const r = t[e];
|
|
34
34
|
if (r !== null && typeof r != "string")
|
|
35
35
|
throw new Error(`接口 ${o} 字段 ${e} 无效`);
|
|
@@ -41,11 +41,11 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
41
41
|
throw new Error(`接口 ${o} 字段 ${e} 无效`);
|
|
42
42
|
return r;
|
|
43
43
|
}
|
|
44
|
-
},
|
|
44
|
+
}, q = (t, e, o) => {
|
|
45
45
|
const r = t[e];
|
|
46
46
|
return r === null ? {} : u(r, o, e);
|
|
47
|
-
},
|
|
48
|
-
const e = u(t,
|
|
47
|
+
}, k = (t) => {
|
|
48
|
+
const e = u(t, E, "data"), o = S(e, "endSessionUrl", E);
|
|
49
49
|
if (!o) return null;
|
|
50
50
|
try {
|
|
51
51
|
return new URL(o).protocol === "https:" ? o : null;
|
|
@@ -57,10 +57,10 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
57
57
|
if (e.purpose !== "user") throw new Error("产品用户 Web 只接受 user Purpose 会话");
|
|
58
58
|
return {
|
|
59
59
|
globalUserId: s(e, "globalUserId", c),
|
|
60
|
-
localUserId:
|
|
60
|
+
localUserId: g(e, "localUserId", c),
|
|
61
61
|
activeSpaceId: s(e, "activeSpaceId", c),
|
|
62
|
-
authorityId:
|
|
63
|
-
orgId:
|
|
62
|
+
authorityId: g(e, "authorityId", c),
|
|
63
|
+
orgId: g(e, "orgId", c),
|
|
64
64
|
purpose: "user",
|
|
65
65
|
csrfToken: s(e, "csrfToken", c),
|
|
66
66
|
issuedAt: s(e, "issuedAt", c),
|
|
@@ -76,14 +76,14 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
76
76
|
entitlementCode: s(r, "entitlementCode", e),
|
|
77
77
|
status: S(r, "status", e),
|
|
78
78
|
startsAt: s(r, "startsAt", e),
|
|
79
|
-
expiresAt:
|
|
80
|
-
metadata:
|
|
79
|
+
expiresAt: I(r, "expiresAt", e),
|
|
80
|
+
metadata: q(r, "metadata", e)
|
|
81
81
|
};
|
|
82
|
-
},
|
|
83
|
-
const o = u(t, i, `spaces[${e}]`), r = u(o.entitlementSummary, i, "entitlementSummary"), n = r.codes,
|
|
82
|
+
}, B = (t, e) => {
|
|
83
|
+
const o = u(t, i, `spaces[${e}]`), r = u(o.entitlementSummary, i, "entitlementSummary"), n = r.codes, m = o.entitlements;
|
|
84
84
|
if (!Array.isArray(n) || n.some((b) => typeof b != "string"))
|
|
85
85
|
throw new Error(`接口 ${i} 字段 entitlementSummary.codes 无效`);
|
|
86
|
-
if (!Array.isArray(
|
|
86
|
+
if (!Array.isArray(m))
|
|
87
87
|
throw new Error(`接口 ${i} 字段 entitlements 无效`);
|
|
88
88
|
return {
|
|
89
89
|
id: s(o, "id", i),
|
|
@@ -94,24 +94,24 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
94
94
|
status: s(o, "status", i),
|
|
95
95
|
membershipStatus: s(o, "membershipStatus", i),
|
|
96
96
|
entitlementSummary: {
|
|
97
|
-
activeCount:
|
|
97
|
+
activeCount: g(r, "activeCount", i),
|
|
98
98
|
codes: [...n]
|
|
99
99
|
},
|
|
100
|
-
entitlements:
|
|
101
|
-
(b,
|
|
100
|
+
entitlements: m.map(
|
|
101
|
+
(b, p) => U(b, i, `entitlements[${p}]`)
|
|
102
102
|
)
|
|
103
103
|
};
|
|
104
|
-
},
|
|
104
|
+
}, V = (t) => {
|
|
105
105
|
const e = u(t, i, "data"), o = s(e, "activeSpaceId", i);
|
|
106
106
|
if (!Array.isArray(e.spaces)) throw new Error(`接口 ${i} 字段 spaces 无效`);
|
|
107
|
-
const r = e.spaces.map(
|
|
107
|
+
const r = e.spaces.map(B);
|
|
108
108
|
if (!r.some((n) => n.id === o))
|
|
109
109
|
throw new Error(`接口 ${i} 的当前空间不在可用空间列表中`);
|
|
110
110
|
return { activeSpaceId: o, spaces: r };
|
|
111
111
|
}, H = (t) => {
|
|
112
|
-
const e = u(t,
|
|
113
|
-
return { nickName: (S(e, "nickName",
|
|
114
|
-
},
|
|
112
|
+
const e = u(t, $, "data");
|
|
113
|
+
return { nickName: (S(e, "nickName", $) ?? "").trim() };
|
|
114
|
+
}, j = (t) => {
|
|
115
115
|
const e = u(t, h, "data"), o = (r) => {
|
|
116
116
|
const n = e[r];
|
|
117
117
|
if (typeof n != "number" || !Number.isSafeInteger(n))
|
|
@@ -130,40 +130,40 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
130
130
|
productReservedPoints: o("productReservedPoints"),
|
|
131
131
|
walletAvailablePoints: o("walletAvailablePoints"),
|
|
132
132
|
walletReservedPoints: o("walletReservedPoints"),
|
|
133
|
-
walletVersion:
|
|
133
|
+
walletVersion: g(e, "walletVersion", h)
|
|
134
134
|
};
|
|
135
|
-
},
|
|
135
|
+
}, G = (t) => {
|
|
136
136
|
if (t === null) return null;
|
|
137
|
-
const e = u(t,
|
|
137
|
+
const e = u(t, f, "data"), o = e.tier;
|
|
138
138
|
if (typeof o != "number" || !Number.isSafeInteger(o))
|
|
139
|
-
throw new Error(`接口 ${
|
|
139
|
+
throw new Error(`接口 ${f} 字段 tier 无效`);
|
|
140
140
|
if (typeof e.isDefault != "boolean")
|
|
141
|
-
throw new Error(`接口 ${
|
|
141
|
+
throw new Error(`接口 ${f} 字段 isDefault 无效`);
|
|
142
142
|
return {
|
|
143
|
-
subscriptionId:
|
|
144
|
-
planCode: s(e, "planCode",
|
|
145
|
-
planName: (S(e, "planName",
|
|
143
|
+
subscriptionId: I(e, "subscriptionId", f),
|
|
144
|
+
planCode: s(e, "planCode", f),
|
|
145
|
+
planName: (S(e, "planName", f) ?? "").trim(),
|
|
146
146
|
tier: o,
|
|
147
147
|
isDefault: e.isDefault,
|
|
148
|
-
spaceType: S(e, "spaceType",
|
|
149
|
-
currentPeriodEnd:
|
|
148
|
+
spaceType: S(e, "spaceType", f) ?? "",
|
|
149
|
+
currentPeriodEnd: I(e, "currentPeriodEnd", f)
|
|
150
150
|
};
|
|
151
|
-
},
|
|
151
|
+
}, K = /* @__PURE__ */ new Set(["month", "year", "one_time"]), X = (t, e) => {
|
|
152
152
|
const o = u(t, a, e), r = s(o, "billingPeriod", a);
|
|
153
|
-
if (!
|
|
153
|
+
if (!K.has(r)) throw new Error(`接口 ${a} 字段 ${e}.billingPeriod 无效`);
|
|
154
154
|
return {
|
|
155
155
|
code: s(o, "code", a),
|
|
156
|
-
amountCents:
|
|
156
|
+
amountCents: g(o, "amountCents", a),
|
|
157
157
|
currency: s(o, "currency", a),
|
|
158
158
|
billingPeriod: r,
|
|
159
|
-
durationDays:
|
|
160
|
-
pointCycles:
|
|
159
|
+
durationDays: g(o, "durationDays", a),
|
|
160
|
+
pointCycles: g(o, "pointCycles", a)
|
|
161
161
|
};
|
|
162
|
-
},
|
|
162
|
+
}, Y = (t, e) => {
|
|
163
163
|
const o = u(t, a, e), r = o.limit;
|
|
164
164
|
if (r != null && (typeof r != "number" || !Number.isSafeInteger(r) || r < 0))
|
|
165
165
|
throw new Error(`接口 ${a} 字段 ${e}.limit 无效`);
|
|
166
|
-
const n = Array.isArray(o.discounts) ? o.discounts.filter((
|
|
166
|
+
const n = Array.isArray(o.discounts) ? o.discounts.filter((m) => typeof m == "string") : [];
|
|
167
167
|
return {
|
|
168
168
|
key: S(o, "key", a) ?? "",
|
|
169
169
|
name: s(o, "name", a),
|
|
@@ -171,23 +171,23 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
171
171
|
limit: typeof r == "number" ? r : null,
|
|
172
172
|
discounts: n
|
|
173
173
|
};
|
|
174
|
-
},
|
|
174
|
+
}, J = (t, e) => {
|
|
175
175
|
const o = `data[${e}]`, r = u(t, a, o), n = s(r, "spaceType", a);
|
|
176
176
|
if (n !== "personal" && n !== "team") throw new Error(`接口 ${a} 字段 ${o}.spaceType 无效`);
|
|
177
177
|
if (typeof r.tier != "number" || !Number.isSafeInteger(r.tier)) throw new Error(`接口 ${a} 字段 ${o}.tier 无效`);
|
|
178
178
|
if (typeof r.isDefault != "boolean") throw new Error(`接口 ${a} 字段 ${o}.isDefault 无效`);
|
|
179
179
|
if (!Array.isArray(r.prices)) throw new Error(`接口 ${a} 字段 ${o}.prices 无效`);
|
|
180
|
-
const
|
|
180
|
+
const m = Array.isArray(r.benefits) ? r.benefits : [], b = Array.isArray(r.otherProducts) ? r.otherProducts.filter((p) => typeof p == "string" && p.trim() !== "").map((p) => p.trim()) : [];
|
|
181
181
|
return {
|
|
182
182
|
code: s(r, "code", a),
|
|
183
183
|
name: s(r, "name", a).trim(),
|
|
184
184
|
spaceType: n,
|
|
185
185
|
tier: r.tier,
|
|
186
186
|
isDefault: r.isDefault,
|
|
187
|
-
includedSeats:
|
|
188
|
-
monthlyPoints:
|
|
189
|
-
prices: r.prices.map((
|
|
190
|
-
benefits:
|
|
187
|
+
includedSeats: g(r, "includedSeats", a),
|
|
188
|
+
monthlyPoints: g(r, "monthlyPoints", a),
|
|
189
|
+
prices: r.prices.map((p, N) => X(p, `${o}.prices[${N}]`)),
|
|
190
|
+
benefits: m.map((p, N) => Y(p, `${o}.benefits[${N}]`)),
|
|
191
191
|
otherProducts: b
|
|
192
192
|
};
|
|
193
193
|
}, L = (t, e) => {
|
|
@@ -195,46 +195,49 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
195
195
|
if (!Array.isArray(o) || o.some((r) => typeof r != "string"))
|
|
196
196
|
throw new Error(`接口 ${y} 字段 ${e} 无效`);
|
|
197
197
|
return [...o];
|
|
198
|
-
},
|
|
198
|
+
}, Q = (t) => {
|
|
199
199
|
if (!Array.isArray(t)) throw new Error(`接口 ${a} 字段 data 无效`);
|
|
200
|
-
return t.map(
|
|
201
|
-
},
|
|
200
|
+
return t.map(J);
|
|
201
|
+
}, ut = (t, e) => {
|
|
202
202
|
const o = e === "/" ? "" : e;
|
|
203
203
|
return {
|
|
204
|
+
async reportBehaviorEvents(r) {
|
|
205
|
+
r.length !== 0 && await t.post(W, { events: r });
|
|
206
|
+
},
|
|
204
207
|
startLogin(r, n) {
|
|
205
|
-
const
|
|
206
|
-
return `${o}${
|
|
208
|
+
const m = M(r, n);
|
|
209
|
+
return `${o}${d}/startLogin?returnPath=${encodeURIComponent(m)}`;
|
|
207
210
|
},
|
|
208
211
|
async getSession() {
|
|
209
212
|
return D(l(c, await t.get(c)));
|
|
210
213
|
},
|
|
211
214
|
async getSpaces() {
|
|
212
|
-
return
|
|
215
|
+
return V(l(i, await t.get(i)));
|
|
213
216
|
},
|
|
214
217
|
async switchSpace(r) {
|
|
215
218
|
const n = l(T, await t.post(T, { globalSpaceId: r }));
|
|
216
219
|
return D(n);
|
|
217
220
|
},
|
|
218
221
|
async getProfile() {
|
|
219
|
-
return H(l(
|
|
222
|
+
return H(l($, await t.get($)));
|
|
220
223
|
},
|
|
221
224
|
async getWallet() {
|
|
222
|
-
return
|
|
225
|
+
return j(l(h, await t.get(h)));
|
|
223
226
|
},
|
|
224
227
|
async getEntitlements() {
|
|
225
228
|
const r = l(P, await t.get(P));
|
|
226
229
|
if (!Array.isArray(r)) throw new Error(`接口 ${P} 字段 data 无效`);
|
|
227
|
-
return r.map((n,
|
|
230
|
+
return r.map((n, m) => U(n, P, `entitlements[${m}]`));
|
|
228
231
|
},
|
|
229
232
|
async getSubscription() {
|
|
230
|
-
return
|
|
233
|
+
return G(l(f, await t.get(f)));
|
|
231
234
|
},
|
|
232
235
|
async getPlans() {
|
|
233
|
-
return
|
|
236
|
+
return Q(l(a, await t.get(a)));
|
|
234
237
|
},
|
|
235
238
|
async logout() {
|
|
236
|
-
const r = l(
|
|
237
|
-
return { endSessionUrl:
|
|
239
|
+
const r = l(E, await t.post(E));
|
|
240
|
+
return { endSessionUrl: k(r) };
|
|
238
241
|
},
|
|
239
242
|
async getShownPrompts(r) {
|
|
240
243
|
const n = await t.get(y, { params: { keys: r.join(",") } });
|
|
@@ -245,34 +248,34 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
245
248
|
return L(l(y, n), "claimed");
|
|
246
249
|
}
|
|
247
250
|
};
|
|
248
|
-
},
|
|
251
|
+
}, lt = async (t) => {
|
|
249
252
|
let e = await t.getSession();
|
|
250
253
|
const o = await t.getSpaces();
|
|
251
254
|
if (o.activeSpaceId !== e.activeSpaceId && (e = await t.getSession()), o.activeSpaceId !== e.activeSpaceId)
|
|
252
255
|
throw new Error("产品会话与统一空间上下文不一致");
|
|
253
256
|
return { session: e, spaces: o.spaces };
|
|
254
|
-
},
|
|
257
|
+
}, dt = (t) => t == null || !Number.isFinite(t) ? "暂无" : t >= 1e8 ? `${(Math.floor(t / 1e7) / 10).toFixed(1)}亿` : t >= 1e4 ? `${(Math.floor(t / 1e3) / 10).toFixed(1)}万` : t.toLocaleString("zh-CN"), mt = (t) => t.toLocaleString("zh-CN", { maximumFractionDigits: 0 }), pt = (t) => t > 0 && t < 0.01 ? "<0.01" : t.toLocaleString("zh-CN", { maximumFractionDigits: 2 }), ft = (t) => t ? `¥${(t / 100).toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "暂无", gt = (t) => {
|
|
255
258
|
if (t === void 0 || t <= 0) return "";
|
|
256
259
|
const e = Math.floor(t / 60), o = Math.floor(t % 60);
|
|
257
260
|
return `${e}:${String(o).padStart(2, "0")}`;
|
|
258
|
-
},
|
|
261
|
+
}, wt = (t) => {
|
|
259
262
|
if (t === void 0 || t <= 0) return "暂无";
|
|
260
263
|
const e = Math.floor(t / 3600), o = Math.floor(t % 3600 / 60), r = t % 60;
|
|
261
264
|
return e > 0 ? `${e}小时${o}分` : o > 0 ? `${o}分${r}秒` : `${r}秒`;
|
|
262
|
-
},
|
|
265
|
+
}, ht = (t) => {
|
|
263
266
|
const e = new Date(t);
|
|
264
267
|
return Number.isNaN(e.getTime()) ? "暂无" : new Intl.DateTimeFormat("zh-CN", { dateStyle: "short", timeStyle: "short" }).format(e);
|
|
265
|
-
},
|
|
268
|
+
}, St = (t) => {
|
|
266
269
|
if (!t) return "长期有效";
|
|
267
270
|
const e = new Date(t);
|
|
268
271
|
return Number.isNaN(e.getTime()) ? "暂无" : new Intl.DateTimeFormat("zh-CN", { dateStyle: "medium" }).format(e);
|
|
269
|
-
},
|
|
272
|
+
}, Z = () => ({
|
|
270
273
|
session: null,
|
|
271
274
|
spaces: [],
|
|
272
275
|
bootstrapped: !1,
|
|
273
276
|
serviceUnavailable: !1
|
|
274
|
-
}),
|
|
275
|
-
let t =
|
|
277
|
+
}), yt = () => {
|
|
278
|
+
let t = Z();
|
|
276
279
|
const e = /* @__PURE__ */ new Set(), o = (r) => {
|
|
277
280
|
t = r, e.forEach((n) => n());
|
|
278
281
|
};
|
|
@@ -295,84 +298,84 @@ const C = (t) => t.includes("\\") || [...t].some((e) => {
|
|
|
295
298
|
o({ session: null, spaces: [], bootstrapped: !0, serviceUnavailable: r.unavailable ?? !1 });
|
|
296
299
|
}
|
|
297
300
|
};
|
|
298
|
-
}, R = _(null),
|
|
301
|
+
}, R = _(null), bt = R.Provider, tt = () => {
|
|
299
302
|
const t = F(R);
|
|
300
303
|
if (!t) throw new Error("AuthStoreProvider 尚未初始化");
|
|
301
304
|
return t;
|
|
302
|
-
},
|
|
303
|
-
const t =
|
|
305
|
+
}, Pt = () => {
|
|
306
|
+
const t = tt();
|
|
304
307
|
return x(t.subscribe, t.getState, t.getState);
|
|
305
|
-
},
|
|
308
|
+
}, Et = (t) => t instanceof Error && t.message.trim() ? t.message : "请稍后重试;如问题持续,请联系管理员。", $t = (t, e) => z(t).status === e, C = "24city.console.logout-at", et = 15e3;
|
|
306
309
|
let w = null;
|
|
307
|
-
const
|
|
310
|
+
const rt = () => {
|
|
308
311
|
try {
|
|
309
|
-
return Number(window.localStorage.getItem(
|
|
312
|
+
return Number(window.localStorage.getItem(C) ?? Number.NaN);
|
|
310
313
|
} catch {
|
|
311
314
|
return Number.NaN;
|
|
312
315
|
}
|
|
313
316
|
};
|
|
314
|
-
function
|
|
317
|
+
function Nt(t = Date.now()) {
|
|
315
318
|
try {
|
|
316
|
-
window.localStorage.setItem(
|
|
319
|
+
window.localStorage.setItem(C, String(t));
|
|
317
320
|
} catch {
|
|
318
321
|
}
|
|
319
322
|
}
|
|
320
|
-
function
|
|
323
|
+
function ot() {
|
|
321
324
|
try {
|
|
322
|
-
window.localStorage.removeItem(
|
|
325
|
+
window.localStorage.removeItem(C);
|
|
323
326
|
} catch {
|
|
324
327
|
}
|
|
325
328
|
}
|
|
326
|
-
function
|
|
329
|
+
function It() {
|
|
327
330
|
w = "leaving";
|
|
328
331
|
}
|
|
329
332
|
function At() {
|
|
330
333
|
return w === "leaving";
|
|
331
334
|
}
|
|
332
|
-
function
|
|
335
|
+
function vt(t = Date.now()) {
|
|
333
336
|
if (w === "leaving") return !1;
|
|
334
|
-
const e = t -
|
|
335
|
-
return e >= 0 && e <
|
|
337
|
+
const e = t - rt();
|
|
338
|
+
return e >= 0 && e < et && (w = "logged-out"), w === "logged-out";
|
|
336
339
|
}
|
|
337
340
|
function Ct() {
|
|
338
341
|
return w === "logged-out";
|
|
339
342
|
}
|
|
340
|
-
function
|
|
343
|
+
function Tt() {
|
|
341
344
|
w === "logged-out" && (w = null);
|
|
342
345
|
}
|
|
343
|
-
function
|
|
344
|
-
w = null,
|
|
346
|
+
function Dt() {
|
|
347
|
+
w = null, ot();
|
|
345
348
|
}
|
|
346
349
|
export {
|
|
347
|
-
|
|
350
|
+
bt as A,
|
|
348
351
|
s as B,
|
|
349
352
|
M as C,
|
|
350
|
-
|
|
353
|
+
Et as D,
|
|
351
354
|
l as E,
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
+
Nt as a,
|
|
356
|
+
yt as b,
|
|
357
|
+
ut as c,
|
|
355
358
|
Ct as d,
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
359
|
+
Dt as e,
|
|
360
|
+
lt as f,
|
|
361
|
+
tt as g,
|
|
362
|
+
pt as h,
|
|
360
363
|
At as i,
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
364
|
+
gt as j,
|
|
365
|
+
St as k,
|
|
366
|
+
It as l,
|
|
367
|
+
ht as m,
|
|
368
|
+
vt as n,
|
|
369
|
+
wt as o,
|
|
370
|
+
dt as p,
|
|
371
|
+
mt as q,
|
|
372
|
+
Tt as r,
|
|
373
|
+
ft as s,
|
|
371
374
|
$t as t,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
375
|
+
Pt as u,
|
|
376
|
+
ct as v,
|
|
377
|
+
ot as w,
|
|
378
|
+
it as x,
|
|
379
|
+
g as y,
|
|
377
380
|
u as z
|
|
378
381
|
};
|
|
@@ -2,8 +2,8 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { QueryClient as c, QueryClientProvider as l } from "@tanstack/react-query";
|
|
3
3
|
import { useMemo as i } from "react";
|
|
4
4
|
import { CustomerRuntimeConfigProvider as f } from "@24city/web-runtime/runtime-config-provider";
|
|
5
|
-
import { A as d } from "./auth-provider-
|
|
6
|
-
import { b as m, A as p } from "./logout-signal-
|
|
5
|
+
import { A as d } from "./auth-provider-3AIfwcdS.js";
|
|
6
|
+
import { b as m, A as p } from "./logout-signal-CsnJzWTz.js";
|
|
7
7
|
import { U as C, E as y } from "./unsupported-browser-Dwq1mNRy.js";
|
|
8
8
|
import { C as h } from "./context-CaVim6ZO.js";
|
|
9
9
|
import { parseCustomerRuntimeConfig as R, loadCustomerRuntimeConfig as v } from "@24city/web-runtime/core/runtime-config";
|