@demiurgejs/core 0.1.0 → 0.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/bin/demiurge.mjs +51 -0
- package/dist/browser/file-router.d.ts +5 -0
- package/dist/browser/file-router.d.ts.map +1 -1
- package/dist/chunks/request-metadata-DwEO1EAS.js +477 -0
- package/dist/chunks/request-metadata-DwEO1EAS.js.map +1 -0
- package/dist/chunks/static-files-DUjHw-4H.js +11 -0
- package/dist/chunks/static-files-DUjHw-4H.js.map +1 -0
- package/dist/chunks/{streaming-27pwhjGC.js → streaming-Ci6vf3BB.js} +117 -107
- package/dist/chunks/streaming-Ci6vf3BB.js.map +1 -0
- package/dist/chunks/{testing-BBnJ5WUR.js → testing-DBjVCN5v.js} +2384 -1941
- package/dist/chunks/testing-DBjVCN5v.js.map +1 -0
- package/dist/cli.d.ts +42 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +164 -0
- package/dist/cli.js.map +1 -0
- package/dist/document/index.d.ts +2 -2
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/render.d.ts +2 -1
- package/dist/document/render.d.ts.map +1 -1
- package/dist/document/scripts.d.ts +22 -0
- package/dist/document/scripts.d.ts.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +893 -1035
- package/dist/index.js.map +1 -1
- package/dist/internal/testing.js +15 -14
- package/dist/internal/testing.js.map +1 -1
- package/dist/node/index.js +86 -85
- package/dist/node/index.js.map +1 -1
- package/dist/node/static.d.ts.map +1 -1
- package/dist/node/streaming.d.ts +2 -0
- package/dist/node/streaming.d.ts.map +1 -1
- package/dist/route/action.d.ts +11 -11
- package/dist/route/action.d.ts.map +1 -1
- package/dist/route/index.d.ts +2 -1
- package/dist/route/index.d.ts.map +1 -1
- package/dist/route/middleware.d.ts +7 -0
- package/dist/route/middleware.d.ts.map +1 -0
- package/dist/route/page.d.ts +2 -2
- package/dist/route/page.d.ts.map +1 -1
- package/dist/route/response.d.ts +19 -19
- package/dist/route/response.d.ts.map +1 -1
- package/dist/route/types.d.ts +55 -31
- package/dist/route/types.d.ts.map +1 -1
- package/dist/route/webhook.d.ts +1 -1
- package/dist/router/manifest.d.ts +4 -1
- package/dist/router/manifest.d.ts.map +1 -1
- package/dist/routing/generate.d.ts +2 -0
- package/dist/routing/generate.d.ts.map +1 -1
- package/dist/routing/index.d.ts +1 -1
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/types.d.ts +2 -0
- package/dist/routing/types.d.ts.map +1 -1
- package/dist/security/cors.d.ts.map +1 -1
- package/dist/security/index.d.ts +4 -2
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/policy.d.ts +31 -2
- package/dist/security/policy.d.ts.map +1 -1
- package/dist/security/types.d.ts +27 -13
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/verification.d.ts +8 -0
- package/dist/security/verification.d.ts.map +1 -0
- package/dist/server/errors.d.ts.map +1 -1
- package/dist/server/not-found.d.ts.map +1 -1
- package/dist/server/render-tree.d.ts +6 -1
- package/dist/server/render-tree.d.ts.map +1 -1
- package/dist/server/request-handler.d.ts +4 -1
- package/dist/server/request-handler.d.ts.map +1 -1
- package/dist/server/ssr.d.ts +1 -0
- package/dist/server/ssr.d.ts.map +1 -1
- package/dist/static/index.d.ts +15 -0
- package/dist/static/index.d.ts.map +1 -1
- package/dist/static/index.js +684 -123
- package/dist/static/index.js.map +1 -1
- package/dist/static/preview.d.ts +8 -0
- package/dist/static/preview.d.ts.map +1 -0
- package/dist/static/vercel.d.ts +31 -0
- package/dist/static/vercel.d.ts.map +1 -0
- package/dist/static-files.d.ts +5 -0
- package/dist/static-files.d.ts.map +1 -0
- package/dist/vite/index.d.ts +3 -2
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +882 -288
- package/dist/vite/index.js.map +1 -1
- package/dist/vite/plugin.d.ts +13 -0
- package/dist/vite/plugin.d.ts.map +1 -1
- package/dist/vite/policy-verification.d.ts +10 -0
- package/dist/vite/policy-verification.d.ts.map +1 -0
- package/package.json +9 -1
- package/dist/chunks/index-BnX9Qxbm.js +0 -44
- package/dist/chunks/index-BnX9Qxbm.js.map +0 -1
- package/dist/chunks/ssr-O3d7Q73U.js +0 -273
- package/dist/chunks/ssr-O3d7Q73U.js.map +0 -1
- package/dist/chunks/streaming-27pwhjGC.js.map +0 -1
- package/dist/chunks/testing-BBnJ5WUR.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,33 +1,91 @@
|
|
|
1
1
|
import { jsx as H } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
import { r as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as gn, c as wn, d as yn } from "./chunks/index-BnX9Qxbm.js";
|
|
2
|
+
import { createContext as _, useState as I, useRef as T, useEffect as C, useMemo as V, createElement as f, useContext as W, Component as G } from "react";
|
|
3
|
+
import { g as K, H as Y, h as Z, i as Q } from "./chunks/request-metadata-DwEO1EAS.js";
|
|
4
|
+
import { j as Qt, k as Xt, l as Jt, d as er, m as tr, r as rr, n as nr } from "./chunks/request-metadata-DwEO1EAS.js";
|
|
5
|
+
import { p as z, k as X, l as J, t as ee, n as te, R as re, o as x, q as ne, j as O, u as ae, w as L, x as ie, N as D, y as oe, z as se, A as ce, B as ue, H as le, C as fe, D as de, E as me } from "./chunks/testing-DBjVCN5v.js";
|
|
6
|
+
import { F as ir, G as or, I as sr, J as cr, K as ur, L as lr, M as fr, O as dr, P as mr, a as hr, Q as gr, S as pr, d as wr, b as yr, T as vr, U as br, V as Er, W as Sr, X as Rr, Y as Ar, Z as $r, _ as xr, $ as kr, a0 as Ir, h as Tr, a1 as Cr, a2 as zr, a3 as Dr, a4 as Nr, a5 as Or, a6 as Lr, a7 as Mr, m as Pr, a8 as Ur, a9 as Fr, aa as jr, ab as Br, ac as qr, ad as Hr, ae as _r, af as Vr, ag as Wr, ah as Gr, ai as Kr, s as Yr, aj as Zr, ak as Qr, al as Xr, am as Jr, an as en, ao as tn, ap as rn, aq as nn, e as an, f as on, v as sn } from "./chunks/testing-DBjVCN5v.js";
|
|
8
7
|
import "react-dom/server";
|
|
9
|
-
|
|
8
|
+
const he = "24h", ge = 1e4;
|
|
9
|
+
function vt(e = {}) {
|
|
10
|
+
const t = e.now ?? Date.now, r = e.defaultTtl ?? he, n = e.maximumEntries ?? ge;
|
|
11
|
+
if (!Number.isSafeInteger(n) || n <= 0)
|
|
12
|
+
throw new Error(
|
|
13
|
+
"Demiurge idempotency maximumEntries must be a positive integer."
|
|
14
|
+
);
|
|
15
|
+
const a = z(r);
|
|
16
|
+
if (!Number.isFinite(a))
|
|
17
|
+
throw new Error("Demiurge idempotency defaultTtl must be finite.");
|
|
18
|
+
const i = /* @__PURE__ */ new Map();
|
|
19
|
+
return {
|
|
20
|
+
async run(s) {
|
|
21
|
+
const o = X(s.key), u = t();
|
|
22
|
+
pe(i, u);
|
|
23
|
+
const d = i.get(o);
|
|
24
|
+
if (d && (d.pending || d.expiresAt > u))
|
|
25
|
+
return {
|
|
26
|
+
key: o,
|
|
27
|
+
replayed: !0,
|
|
28
|
+
value: await d.value
|
|
29
|
+
};
|
|
30
|
+
if (i.size >= n && we(i), i.size >= n)
|
|
31
|
+
throw new Error(
|
|
32
|
+
"Demiurge idempotency store is at capacity with in-flight mutations."
|
|
33
|
+
);
|
|
34
|
+
const p = Promise.resolve().then(s.fn), c = {
|
|
35
|
+
expiresAt: Number.POSITIVE_INFINITY,
|
|
36
|
+
pending: !0,
|
|
37
|
+
value: p
|
|
38
|
+
};
|
|
39
|
+
i.set(o, c);
|
|
40
|
+
try {
|
|
41
|
+
const l = await p;
|
|
42
|
+
return c.pending = !1, c.expiresAt = t() + z(s.ttl ?? r), {
|
|
43
|
+
key: o,
|
|
44
|
+
replayed: !1,
|
|
45
|
+
value: l
|
|
46
|
+
};
|
|
47
|
+
} catch (l) {
|
|
48
|
+
throw i.get(o) === c && i.delete(o), l;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function pe(e, t) {
|
|
54
|
+
for (const [r, n] of e)
|
|
55
|
+
!n.pending && n.expiresAt <= t && e.delete(r);
|
|
56
|
+
}
|
|
57
|
+
function we(e) {
|
|
58
|
+
for (const [t, r] of e)
|
|
59
|
+
if (!r.pending) {
|
|
60
|
+
e.delete(t);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function bt(e, t) {
|
|
65
|
+
return e.run(t);
|
|
66
|
+
}
|
|
67
|
+
function Et(e) {
|
|
10
68
|
return {
|
|
11
69
|
entries: e
|
|
12
70
|
};
|
|
13
71
|
}
|
|
14
|
-
function
|
|
72
|
+
function St(e) {
|
|
15
73
|
return [
|
|
16
74
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
17
75
|
`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"${e.entries.some((r) => r.alternates?.length) ? ' xmlns:xhtml="http://www.w3.org/1999/xhtml"' : ""}>`,
|
|
18
|
-
...e.entries.map(
|
|
76
|
+
...e.entries.map(ve),
|
|
19
77
|
"</urlset>",
|
|
20
78
|
""
|
|
21
79
|
].join(`
|
|
22
80
|
`);
|
|
23
81
|
}
|
|
24
|
-
function
|
|
82
|
+
function Rt(e) {
|
|
25
83
|
return e;
|
|
26
84
|
}
|
|
27
|
-
function
|
|
85
|
+
function At(e) {
|
|
28
86
|
return e;
|
|
29
87
|
}
|
|
30
|
-
function
|
|
88
|
+
function $t(e) {
|
|
31
89
|
const t = [];
|
|
32
90
|
for (const r of e.rules ?? []) {
|
|
33
91
|
for (const n of b(r.userAgent))
|
|
@@ -45,44 +103,44 @@ function jt(e) {
|
|
|
45
103
|
`).replace(/\n+$/, "")}
|
|
46
104
|
`;
|
|
47
105
|
}
|
|
48
|
-
function
|
|
49
|
-
const t = e.width ?? 1200, r = e.height ?? 630, n = e.background ?? "#101820", a = e.foreground ?? "#ffffff", i =
|
|
50
|
-
return
|
|
51
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}" viewBox="0 0 ${t} ${r}" role="img" aria-label="${
|
|
52
|
-
` <rect width="100%" height="100%" fill="${
|
|
53
|
-
|
|
54
|
-
` <text x="72" y="${
|
|
55
|
-
|
|
106
|
+
function ye(e) {
|
|
107
|
+
const t = e.width ?? 1200, r = e.height ?? 630, n = e.background ?? "#101820", a = e.foreground ?? "#ffffff", i = A(e.title, 120), s = e.subtitle ? A(e.subtitle, 160) : void 0, o = e.brand ? A(e.brand, 80) : void 0;
|
|
108
|
+
return Se(t, r), [
|
|
109
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}" viewBox="0 0 ${t} ${r}" role="img" aria-label="${g(i)}">`,
|
|
110
|
+
` <rect width="100%" height="100%" fill="${g(n)}" />`,
|
|
111
|
+
o ? ` <text x="72" y="96" fill="${g(a)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="32" font-weight="700">${w(o)}</text>` : null,
|
|
112
|
+
` <text x="72" y="${s ? 300 : 340}" fill="${g(a)}" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="76" font-weight="800">${w(i)}</text>`,
|
|
113
|
+
s ? ` <text x="72" y="392" fill="${g(a)}" fill-opacity="0.78" font-family="Inter, ui-sans-serif, system-ui, sans-serif" font-size="38" font-weight="500">${w(s)}</text>` : null,
|
|
56
114
|
"</svg>"
|
|
57
115
|
].filter((u) => !!u).join(`
|
|
58
116
|
`);
|
|
59
117
|
}
|
|
60
|
-
function
|
|
61
|
-
return new Response(
|
|
118
|
+
function xt(e) {
|
|
119
|
+
return new Response(ye(e), {
|
|
62
120
|
headers: {
|
|
63
121
|
"cache-control": "public, max-age=31536000, immutable",
|
|
64
122
|
"content-type": "image/svg+xml; charset=utf-8"
|
|
65
123
|
}
|
|
66
124
|
});
|
|
67
125
|
}
|
|
68
|
-
function
|
|
126
|
+
function ve(e) {
|
|
69
127
|
return [
|
|
70
128
|
" <url>",
|
|
71
129
|
` <loc>${w(e.url)}</loc>`,
|
|
72
|
-
e.lastModified ? ` <lastmod>${w(
|
|
130
|
+
e.lastModified ? ` <lastmod>${w(be(e.lastModified))}</lastmod>` : null,
|
|
73
131
|
e.changeFrequency ? ` <changefreq>${e.changeFrequency}</changefreq>` : null,
|
|
74
|
-
e.priority !== void 0 ? ` <priority>${
|
|
132
|
+
e.priority !== void 0 ? ` <priority>${Ee(e.priority)}</priority>` : null,
|
|
75
133
|
...(e.alternates ?? []).map(
|
|
76
|
-
(t) => ` <xhtml:link rel="alternate" hreflang="${
|
|
134
|
+
(t) => ` <xhtml:link rel="alternate" hreflang="${g(t.hrefLang)}" href="${g(t.href)}" />`
|
|
77
135
|
),
|
|
78
136
|
" </url>"
|
|
79
137
|
].filter((t) => !!t).join(`
|
|
80
138
|
`);
|
|
81
139
|
}
|
|
82
|
-
function
|
|
140
|
+
function be(e) {
|
|
83
141
|
return e instanceof Date ? e.toISOString() : e;
|
|
84
142
|
}
|
|
85
|
-
function
|
|
143
|
+
function Ee(e) {
|
|
86
144
|
if (e < 0 || e > 1)
|
|
87
145
|
throw new Error("Sitemap entry priority must be between 0 and 1.");
|
|
88
146
|
return String(e);
|
|
@@ -93,25 +151,25 @@ function b(e) {
|
|
|
93
151
|
function w(e) {
|
|
94
152
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
95
153
|
}
|
|
96
|
-
function
|
|
154
|
+
function g(e) {
|
|
97
155
|
return w(e).replaceAll('"', """).replaceAll("'", "'");
|
|
98
156
|
}
|
|
99
|
-
function
|
|
157
|
+
function A(e, t) {
|
|
100
158
|
return e.length > t ? `${e.slice(0, t - 3)}...` : e;
|
|
101
159
|
}
|
|
102
|
-
function
|
|
160
|
+
function Se(e, t) {
|
|
103
161
|
if (!Number.isSafeInteger(e) || e <= 0)
|
|
104
162
|
throw new Error("OG image width must be a positive integer.");
|
|
105
163
|
if (!Number.isSafeInteger(t) || t <= 0)
|
|
106
164
|
throw new Error("OG image height must be a positive integer.");
|
|
107
165
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
166
|
+
function kt(e) {
|
|
167
|
+
return J(
|
|
110
168
|
async (t) => {
|
|
111
169
|
const r = e.input ? await e.input(t) : void 0, n = {
|
|
112
170
|
...t,
|
|
113
171
|
input: r
|
|
114
|
-
}, a = async () => await
|
|
172
|
+
}, a = async () => await Re(
|
|
115
173
|
await e.handler(n),
|
|
116
174
|
t
|
|
117
175
|
);
|
|
@@ -131,7 +189,7 @@ function Bt(e) {
|
|
|
131
189
|
}
|
|
132
190
|
);
|
|
133
191
|
}
|
|
134
|
-
const
|
|
192
|
+
const It = {
|
|
135
193
|
async formData({ request: e }) {
|
|
136
194
|
return await e.formData();
|
|
137
195
|
},
|
|
@@ -142,10 +200,10 @@ const Ht = {
|
|
|
142
200
|
return await e.text();
|
|
143
201
|
}
|
|
144
202
|
};
|
|
145
|
-
async function
|
|
146
|
-
return e instanceof Response ? e : await
|
|
203
|
+
async function Re(e, t) {
|
|
204
|
+
return e instanceof Response ? e : await ee(e, t);
|
|
147
205
|
}
|
|
148
|
-
function
|
|
206
|
+
function Tt(e) {
|
|
149
207
|
return typeof e == "function" ? {
|
|
150
208
|
kind: "page",
|
|
151
209
|
render: { mode: "ssr" },
|
|
@@ -158,7 +216,10 @@ function Wt(e) {
|
|
|
158
216
|
view: e.view
|
|
159
217
|
};
|
|
160
218
|
}
|
|
161
|
-
|
|
219
|
+
function Ct(e) {
|
|
220
|
+
return e;
|
|
221
|
+
}
|
|
222
|
+
const zt = {
|
|
162
223
|
hmac(e) {
|
|
163
224
|
return {
|
|
164
225
|
kind: "response",
|
|
@@ -166,7 +227,7 @@ const _t = {
|
|
|
166
227
|
const r = new Uint8Array(await t.request.arrayBuffer()), n = t.request.headers.get(
|
|
167
228
|
e.header ?? "x-webhook-signature"
|
|
168
229
|
);
|
|
169
|
-
return n ? await
|
|
230
|
+
return n ? await Ae(r, n, e) ? await e.handler({
|
|
170
231
|
...t,
|
|
171
232
|
rawBody: r,
|
|
172
233
|
text: () => new TextDecoder().decode(r)
|
|
@@ -182,15 +243,15 @@ const _t = {
|
|
|
182
243
|
};
|
|
183
244
|
}
|
|
184
245
|
};
|
|
185
|
-
async function
|
|
186
|
-
const n = r.algorithm ?? "SHA-256", a = r.encoding ?? "hex", i =
|
|
246
|
+
async function Ae(e, t, r) {
|
|
247
|
+
const n = r.algorithm ?? "SHA-256", a = r.encoding ?? "hex", i = $e(
|
|
187
248
|
t,
|
|
188
249
|
n,
|
|
189
250
|
r.prefix
|
|
190
|
-
),
|
|
191
|
-
if (!
|
|
251
|
+
), s = xe(i, a);
|
|
252
|
+
if (!s)
|
|
192
253
|
return !1;
|
|
193
|
-
const
|
|
254
|
+
const o = await globalThis.crypto.subtle.importKey(
|
|
194
255
|
"raw",
|
|
195
256
|
new TextEncoder().encode(r.secret),
|
|
196
257
|
{
|
|
@@ -202,16 +263,16 @@ async function Ee(e, t, r) {
|
|
|
202
263
|
);
|
|
203
264
|
return await globalThis.crypto.subtle.verify(
|
|
204
265
|
"HMAC",
|
|
205
|
-
s,
|
|
206
266
|
o,
|
|
267
|
+
s,
|
|
207
268
|
Uint8Array.from(e).buffer
|
|
208
269
|
);
|
|
209
270
|
}
|
|
210
|
-
function
|
|
271
|
+
function $e(e, t, r) {
|
|
211
272
|
const n = e.trim(), a = r === void 0 ? `${t.toLowerCase().replace("-", "")}=` : r;
|
|
212
273
|
return a !== !1 && n.startsWith(a) ? n.slice(a.length).trim() : n;
|
|
213
274
|
}
|
|
214
|
-
function
|
|
275
|
+
function xe(e, t) {
|
|
215
276
|
if (t === "hex")
|
|
216
277
|
return /^(?:[0-9a-f]{2})+$/i.test(e) ? Uint8Array.from(
|
|
217
278
|
e.match(/.{2}/g) ?? [],
|
|
@@ -228,1091 +289,888 @@ function $e(e, t) {
|
|
|
228
289
|
return null;
|
|
229
290
|
}
|
|
230
291
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"Demiurge idempotency maximumEntries must be a positive integer."
|
|
237
|
-
);
|
|
238
|
-
const a = D(r);
|
|
239
|
-
if (!Number.isFinite(a))
|
|
240
|
-
throw new Error("Demiurge idempotency defaultTtl must be finite.");
|
|
241
|
-
const i = /* @__PURE__ */ new Map();
|
|
242
|
-
return {
|
|
243
|
-
async run(o) {
|
|
244
|
-
const s = J(o.key), u = t();
|
|
245
|
-
Te(i, u);
|
|
246
|
-
const d = i.get(s);
|
|
247
|
-
if (d && (d.pending || d.expiresAt > u))
|
|
248
|
-
return {
|
|
249
|
-
key: s,
|
|
250
|
-
replayed: !0,
|
|
251
|
-
value: await d.value
|
|
252
|
-
};
|
|
253
|
-
if (i.size >= n && Ie(i), i.size >= n)
|
|
254
|
-
throw new Error(
|
|
255
|
-
"Demiurge idempotency store is at capacity with in-flight mutations."
|
|
256
|
-
);
|
|
257
|
-
const g = Promise.resolve().then(o.fn), c = {
|
|
258
|
-
expiresAt: Number.POSITIVE_INFINITY,
|
|
259
|
-
pending: !0,
|
|
260
|
-
value: g
|
|
261
|
-
};
|
|
262
|
-
i.set(s, c);
|
|
263
|
-
try {
|
|
264
|
-
const l = await g;
|
|
265
|
-
return c.pending = !1, c.expiresAt = t() + D(o.ttl ?? r), {
|
|
266
|
-
key: s,
|
|
267
|
-
replayed: !1,
|
|
268
|
-
value: l
|
|
269
|
-
};
|
|
270
|
-
} catch (l) {
|
|
271
|
-
throw i.get(s) === c && i.delete(s), l;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
function Te(e, t) {
|
|
277
|
-
for (const [r, n] of e)
|
|
278
|
-
!n.pending && n.expiresAt <= t && e.delete(r);
|
|
279
|
-
}
|
|
280
|
-
function Ie(e) {
|
|
281
|
-
for (const [t, r] of e)
|
|
282
|
-
if (!r.pending) {
|
|
283
|
-
e.delete(t);
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
292
|
+
class ke extends Error {
|
|
293
|
+
issues;
|
|
294
|
+
constructor(t) {
|
|
295
|
+
super(Oe(t)), this.name = "EnvValidationError", this.issues = t;
|
|
296
|
+
}
|
|
286
297
|
}
|
|
287
|
-
function
|
|
288
|
-
return e
|
|
298
|
+
function Dt(e) {
|
|
299
|
+
return e;
|
|
289
300
|
}
|
|
290
|
-
function
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
i(S());
|
|
301
|
+
function Nt(e, t) {
|
|
302
|
+
const r = [], n = {};
|
|
303
|
+
for (const a of Object.keys(e)) {
|
|
304
|
+
const i = e[a], s = t[String(a)];
|
|
305
|
+
if (s === void 0 || s === "") {
|
|
306
|
+
if (i.optional) {
|
|
307
|
+
n[a] = void 0;
|
|
308
|
+
continue;
|
|
299
309
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (u.current && De(e.initialMatch) === a.pathname)
|
|
305
|
-
return u.current = !1, () => {
|
|
306
|
-
c = !0;
|
|
307
|
-
};
|
|
308
|
-
s({ status: "loading" }), te(t, a.pathname).then((m) => {
|
|
309
|
-
v() && !l && m && s({ loading: m, status: "loading" });
|
|
310
|
-
}).catch(() => {
|
|
310
|
+
r.push({
|
|
311
|
+
code: "missing",
|
|
312
|
+
key: String(a),
|
|
313
|
+
message: `Environment variable ${String(a)} is required.`
|
|
311
314
|
});
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
const B = await re(
|
|
328
|
-
t,
|
|
329
|
-
a.pathname
|
|
330
|
-
);
|
|
331
|
-
v() && s({
|
|
332
|
-
Error: B,
|
|
333
|
-
error: m,
|
|
334
|
-
pathname: a.pathname,
|
|
335
|
-
status: "error"
|
|
336
|
-
});
|
|
337
|
-
}), () => {
|
|
338
|
-
c = !0, R.abort();
|
|
339
|
-
};
|
|
340
|
-
}, [a.pathname, a.search]);
|
|
341
|
-
const g = _(
|
|
342
|
-
() => ({
|
|
343
|
-
navigation: e.navigation ?? "server",
|
|
344
|
-
push(c) {
|
|
345
|
-
const l = S();
|
|
346
|
-
window.history.pushState(null, "", c);
|
|
347
|
-
const h = S();
|
|
348
|
-
i(h), l.pathname === h.pathname && l.search === h.search && l.hash !== h.hash && Oe(h.hash);
|
|
349
|
-
}
|
|
350
|
-
}),
|
|
351
|
-
[]
|
|
352
|
-
);
|
|
353
|
-
return f(M.Provider, {
|
|
354
|
-
value: g,
|
|
355
|
-
children: f(ze, {
|
|
356
|
-
key: `${a.pathname}${a.search}`,
|
|
357
|
-
Loading: e.loading,
|
|
358
|
-
NotFound: e.notFound,
|
|
359
|
-
match: o
|
|
360
|
-
})
|
|
361
|
-
});
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
function Ce(e, t) {
|
|
365
|
-
const r = t.getAttribute(Z);
|
|
366
|
-
return e.status === "not-found" ? r === "not-found" : e.status === "ready" && r === null;
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
try {
|
|
318
|
+
n[a] = i.parse(String(a), s);
|
|
319
|
+
} catch (o) {
|
|
320
|
+
r.push({
|
|
321
|
+
code: "invalid",
|
|
322
|
+
key: String(a),
|
|
323
|
+
message: o instanceof Error ? o.message : `Environment variable ${String(a)} is invalid.`
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (r.length)
|
|
328
|
+
throw new ke(r);
|
|
329
|
+
return n;
|
|
367
330
|
}
|
|
368
|
-
function
|
|
369
|
-
|
|
370
|
-
|
|
331
|
+
function Ie(e = {}) {
|
|
332
|
+
return y(e, !1, (t, r) => {
|
|
333
|
+
if (r === "true" || r === "1")
|
|
334
|
+
return !0;
|
|
335
|
+
if (r === "false" || r === "0")
|
|
336
|
+
return !1;
|
|
337
|
+
throw new Error(`Environment variable ${t} must be true, false, 1, or 0.`);
|
|
338
|
+
});
|
|
371
339
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
340
|
+
function Te(e, t = {}) {
|
|
341
|
+
return y(t, !1, (r, n) => {
|
|
342
|
+
if (e.includes(n))
|
|
343
|
+
return n;
|
|
375
344
|
throw new Error(
|
|
376
|
-
|
|
345
|
+
`Environment variable ${r} must be one of: ${e.join(", ")}.`
|
|
377
346
|
);
|
|
378
|
-
|
|
379
|
-
r,
|
|
380
|
-
window.location.pathname,
|
|
381
|
-
new Request(window.location.href),
|
|
382
|
-
a ?? await n(new Request(window.location.href)),
|
|
383
|
-
void 0,
|
|
384
|
-
{ documentContributions: !1 }
|
|
385
|
-
), o = Ce(i, t), s = ke(
|
|
386
|
-
o ? {
|
|
387
|
-
...e,
|
|
388
|
-
initialMatch: i,
|
|
389
|
-
loadNavigationData: n,
|
|
390
|
-
navigation: a?.navigation ?? e.navigation
|
|
391
|
-
} : {
|
|
392
|
-
...e,
|
|
393
|
-
loadNavigationData: n,
|
|
394
|
-
navigation: a?.navigation ?? e.navigation
|
|
395
|
-
}
|
|
396
|
-
), { createRoot: u, hydrateRoot: d } = await import("react-dom/client");
|
|
397
|
-
if (o && t.hasAttribute(Y)) {
|
|
398
|
-
d(t, f(s));
|
|
399
|
-
return;
|
|
400
|
-
}
|
|
401
|
-
t.replaceChildren(), u(t).render(f(s));
|
|
347
|
+
});
|
|
402
348
|
}
|
|
403
|
-
function
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
349
|
+
function Ce(e = {}) {
|
|
350
|
+
return y(e, !1, (t, r) => {
|
|
351
|
+
if (!/^-?\d+$/.test(r))
|
|
352
|
+
throw new Error(`Environment variable ${t} must be an integer.`);
|
|
353
|
+
const n = Number(r);
|
|
354
|
+
if (!Number.isSafeInteger(n))
|
|
355
|
+
throw new Error(`Environment variable ${t} must be a safe integer.`);
|
|
356
|
+
if (e.min !== void 0 && n < e.min)
|
|
357
|
+
throw new Error(
|
|
358
|
+
`Environment variable ${t} must be greater than or equal to ${e.min}.`
|
|
359
|
+
);
|
|
360
|
+
if (e.max !== void 0 && n > e.max)
|
|
361
|
+
throw new Error(
|
|
362
|
+
`Environment variable ${t} must be less than or equal to ${e.max}.`
|
|
363
|
+
);
|
|
364
|
+
return n;
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function ze(e = {}) {
|
|
368
|
+
return y(
|
|
369
|
+
e,
|
|
370
|
+
!0,
|
|
371
|
+
(t, r) => M(t, r, e)
|
|
415
372
|
);
|
|
416
373
|
}
|
|
417
|
-
function
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (r.status === "loading") {
|
|
423
|
-
const c = r.loading ?? e;
|
|
424
|
-
return c ? f(c) : null;
|
|
425
|
-
}
|
|
426
|
-
if (r.status === "not-found") {
|
|
427
|
-
const c = r.notFound ?? t ?? ue;
|
|
428
|
-
return r.layouts.reduceRight(
|
|
429
|
-
(l, h) => f(h, {
|
|
430
|
-
children: l,
|
|
431
|
-
path: {},
|
|
432
|
-
pathname: r.pathname
|
|
433
|
-
}),
|
|
434
|
-
f(c, { pathname: r.pathname })
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
if (r.status === "error")
|
|
438
|
-
return r.Error ? f(r.Error, {
|
|
439
|
-
error: r.error,
|
|
440
|
-
pathname: r.pathname,
|
|
441
|
-
status: N(r.error)
|
|
442
|
-
}) : null;
|
|
443
|
-
const { data: n, error: a, page: i, layouts: o, path: s, pathname: u } = r.match, d = f(i, { data: n, path: s, pathname: u }), g = o.reduceRight(
|
|
444
|
-
(c, l) => f(l, { path: s, pathname: u, children: c }),
|
|
445
|
-
d
|
|
374
|
+
function De(e = {}) {
|
|
375
|
+
return y(
|
|
376
|
+
e,
|
|
377
|
+
!1,
|
|
378
|
+
(t, r) => M(t, r, e)
|
|
446
379
|
);
|
|
447
|
-
return f(Pe, {
|
|
448
|
-
Error: a,
|
|
449
|
-
children: g,
|
|
450
|
-
pathname: u
|
|
451
|
-
});
|
|
452
380
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
function N(e) {
|
|
470
|
-
return le(e) ? e.status : 500;
|
|
381
|
+
function Ne(e = {}) {
|
|
382
|
+
return y(e, !1, (t, r) => {
|
|
383
|
+
let n;
|
|
384
|
+
try {
|
|
385
|
+
n = new URL(r);
|
|
386
|
+
} catch {
|
|
387
|
+
throw new Error(`Environment variable ${t} must be a valid URL.`);
|
|
388
|
+
}
|
|
389
|
+
if (e.protocols?.length && !e.protocols.includes(n.protocol))
|
|
390
|
+
throw new Error(
|
|
391
|
+
`Environment variable ${t} must use one of these protocols: ${e.protocols.join(", ")}.`
|
|
392
|
+
);
|
|
393
|
+
return n;
|
|
394
|
+
});
|
|
471
395
|
}
|
|
472
|
-
|
|
396
|
+
const Ot = {
|
|
397
|
+
boolean: Ie,
|
|
398
|
+
enum: Te,
|
|
399
|
+
integer: Ce,
|
|
400
|
+
secret: ze,
|
|
401
|
+
string: De,
|
|
402
|
+
url: Ne
|
|
403
|
+
};
|
|
404
|
+
function y(e, t, r) {
|
|
473
405
|
return {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
search: window.location.search
|
|
406
|
+
optional: e.optional ?? !1,
|
|
407
|
+
parse: r,
|
|
408
|
+
sensitive: t
|
|
478
409
|
};
|
|
479
410
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
})), n = r.headers.get(z);
|
|
487
|
-
if (n === ae) {
|
|
488
|
-
const a = await r.json();
|
|
489
|
-
if (a.hasData !== !0)
|
|
490
|
-
throw new Error("Demiurge received malformed navigation route data.");
|
|
491
|
-
return { data: a.data, hasData: !0 };
|
|
492
|
-
}
|
|
493
|
-
if (n === ie)
|
|
494
|
-
return { hasData: !0 };
|
|
495
|
-
if (n === se || !r.ok) {
|
|
496
|
-
const a = await Le(r), i = oe.includes(
|
|
497
|
-
r.status
|
|
498
|
-
) ? r.status : 500;
|
|
499
|
-
throw ce(i, {
|
|
500
|
-
detail: typeof a?.detail == "string" ? a.detail : void 0,
|
|
501
|
-
title: typeof a?.title == "string" ? a.title : void 0
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
throw new Error(
|
|
505
|
-
"Demiurge expected a navigation data response from the application server."
|
|
506
|
-
);
|
|
507
|
-
}
|
|
508
|
-
async function Le(e) {
|
|
509
|
-
try {
|
|
510
|
-
return await e.json();
|
|
511
|
-
} catch {
|
|
512
|
-
return;
|
|
513
|
-
}
|
|
411
|
+
function M(e, t, r) {
|
|
412
|
+
if (r.minLength !== void 0 && t.length < r.minLength)
|
|
413
|
+
throw new Error(
|
|
414
|
+
`Environment variable ${e} must be at least ${r.minLength} characters.`
|
|
415
|
+
);
|
|
416
|
+
return t;
|
|
514
417
|
}
|
|
515
418
|
function Oe(e) {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
419
|
+
return e.length === 1 ? e[0].message : `Environment validation failed with ${e.length} issues.`;
|
|
420
|
+
}
|
|
421
|
+
function Lt(e = {}) {
|
|
422
|
+
return async function(r) {
|
|
423
|
+
if (r.method.toUpperCase() !== "POST")
|
|
424
|
+
return new Response(null, {
|
|
425
|
+
headers: {
|
|
426
|
+
allow: "POST"
|
|
427
|
+
},
|
|
428
|
+
status: 405
|
|
429
|
+
});
|
|
430
|
+
const n = Me(r);
|
|
431
|
+
if (n)
|
|
432
|
+
return n;
|
|
433
|
+
const a = Pe(e, r);
|
|
434
|
+
if (a)
|
|
435
|
+
return a;
|
|
436
|
+
e.maxBodySize !== void 0 && (r = te({ maxBodySize: e.maxBodySize }, r));
|
|
437
|
+
let i;
|
|
522
438
|
try {
|
|
523
|
-
|
|
524
|
-
} catch {
|
|
525
|
-
|
|
439
|
+
i = await r.json();
|
|
440
|
+
} catch (o) {
|
|
441
|
+
return o instanceof re ? new Response("Security report body too large.", { status: 413 }) : new Response("Invalid security report JSON.", {
|
|
442
|
+
status: 400
|
|
443
|
+
});
|
|
526
444
|
}
|
|
527
|
-
|
|
445
|
+
const s = Ue(i);
|
|
446
|
+
for (let o = 0; o < s.length; o += 1)
|
|
447
|
+
await e.onReport?.(s[o], {
|
|
448
|
+
index: o,
|
|
449
|
+
request: r
|
|
450
|
+
});
|
|
451
|
+
return new Response(null, {
|
|
452
|
+
status: 204
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
const Le = /* @__PURE__ */ new Set([
|
|
457
|
+
"application/csp-report",
|
|
458
|
+
"application/reports+json"
|
|
459
|
+
]);
|
|
460
|
+
function Me(e) {
|
|
461
|
+
const t = e.headers.get("content-type");
|
|
462
|
+
if (!t)
|
|
463
|
+
return null;
|
|
464
|
+
const r = t.split(";", 1)[0]?.trim().toLowerCase();
|
|
465
|
+
return r && Le.has(r) ? null : new Response("Unsupported security report Content-Type.", {
|
|
466
|
+
status: 415
|
|
528
467
|
});
|
|
529
468
|
}
|
|
530
|
-
function
|
|
531
|
-
|
|
469
|
+
function Pe(e, t) {
|
|
470
|
+
if (e.maxBodySize === void 0)
|
|
471
|
+
return null;
|
|
472
|
+
const r = t.headers.get("content-length");
|
|
473
|
+
if (!r)
|
|
474
|
+
return null;
|
|
475
|
+
if (!/^\d+$/.test(r))
|
|
476
|
+
return new Response("Invalid Content-Length.", {
|
|
477
|
+
status: 400
|
|
478
|
+
});
|
|
479
|
+
const n = Number(r);
|
|
480
|
+
return Number.isSafeInteger(n) ? n > x(e.maxBodySize) ? new Response("Security report body too large.", {
|
|
481
|
+
status: 413
|
|
482
|
+
}) : null : new Response("Invalid Content-Length.", {
|
|
483
|
+
status: 400
|
|
484
|
+
});
|
|
532
485
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
486
|
+
function Ue(e) {
|
|
487
|
+
return Array.isArray(e) ? e : Fe(e) && "csp-report" in e ? [e["csp-report"]] : [e];
|
|
488
|
+
}
|
|
489
|
+
function Fe(e) {
|
|
490
|
+
return typeof e == "object" && e !== null;
|
|
491
|
+
}
|
|
492
|
+
function Mt(e, t) {
|
|
493
|
+
const r = {}, n = [];
|
|
494
|
+
let a = 0;
|
|
495
|
+
for (const [i, s] of Object.entries(t.files)) {
|
|
496
|
+
const o = e.getAll(i).filter(qe);
|
|
497
|
+
r[i] = o, s.required && o.length === 0 && n.push({
|
|
498
|
+
code: "file-missing",
|
|
499
|
+
field: i,
|
|
500
|
+
message: `Upload field ${i} requires at least one file.`
|
|
501
|
+
});
|
|
502
|
+
for (const u of o)
|
|
503
|
+
a += u.size, je(i, u, s, n);
|
|
537
504
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
505
|
+
return t.maxTotalSize !== void 0 && a > x(t.maxTotalSize) && n.push({
|
|
506
|
+
code: "total-upload-too-large",
|
|
507
|
+
field: "*",
|
|
508
|
+
message: `Uploaded files exceed the maximum total size of ${t.maxTotalSize}.`
|
|
509
|
+
}), {
|
|
510
|
+
files: r,
|
|
511
|
+
issues: n,
|
|
512
|
+
ok: n.length === 0,
|
|
513
|
+
totalSize: a
|
|
514
|
+
};
|
|
541
515
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
516
|
+
function je(e, t, r, n) {
|
|
517
|
+
r.maxSize !== void 0 && t.size > x(r.maxSize) && n.push({
|
|
518
|
+
code: "file-too-large",
|
|
519
|
+
field: e,
|
|
520
|
+
message: `Upload field ${e} contains ${t.name || "a file"} larger than ${r.maxSize}.`
|
|
521
|
+
}), r.types?.length && !Be(t.type, r.types) && n.push({
|
|
522
|
+
code: "file-type-not-allowed",
|
|
523
|
+
field: e,
|
|
524
|
+
message: `Upload field ${e} contains ${t.name || "a file"} with disallowed type ${t.type || "unknown"}.`
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
function Be(e, t) {
|
|
528
|
+
return t.some((r) => r.endsWith("/*") ? e.startsWith(r.slice(0, -1)) : e === r);
|
|
545
529
|
}
|
|
546
|
-
function
|
|
547
|
-
return
|
|
530
|
+
function qe(e) {
|
|
531
|
+
return e instanceof File;
|
|
548
532
|
}
|
|
549
|
-
function
|
|
550
|
-
const r =
|
|
533
|
+
function He(e, t) {
|
|
534
|
+
const r = t.headers.get("origin");
|
|
551
535
|
if (!r)
|
|
552
|
-
throw new Error(`Image source "${e.src}" is not allowed by the image policy.`);
|
|
553
|
-
x("width", e.width), x("height", e.height), He(e.quality);
|
|
554
|
-
const n = e.format ?? "auto", i = We(e.width, e.widths).map((s) => {
|
|
555
|
-
const u = Math.round(e.height / e.width * s);
|
|
556
536
|
return {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
537
|
+
allowed: !!e.allowMissingOrigin,
|
|
538
|
+
expected: e.origins,
|
|
539
|
+
origin: r,
|
|
540
|
+
reason: e.allowMissingOrigin ? void 0 : "missing-origin"
|
|
541
|
+
};
|
|
542
|
+
const n = P(r);
|
|
543
|
+
if (!n)
|
|
544
|
+
return {
|
|
545
|
+
allowed: !1,
|
|
546
|
+
expected: e.origins,
|
|
547
|
+
origin: r,
|
|
548
|
+
reason: "invalid-origin"
|
|
567
549
|
};
|
|
568
|
-
|
|
550
|
+
const a = _e(e, n, t);
|
|
569
551
|
return {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
loading: e.priority ? "eager" : "lazy",
|
|
575
|
-
sizes: e.sizes,
|
|
576
|
-
source: r,
|
|
577
|
-
src: o.src,
|
|
578
|
-
srcSet: i.map((s) => `${s.src} ${s.width}w`).join(", "),
|
|
579
|
-
variants: i,
|
|
580
|
-
width: e.width
|
|
552
|
+
allowed: a,
|
|
553
|
+
expected: e.origins,
|
|
554
|
+
origin: n,
|
|
555
|
+
reason: a ? void 0 : "origin-not-allowed"
|
|
581
556
|
};
|
|
582
557
|
}
|
|
583
|
-
function
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
try {
|
|
588
|
-
r = new URL(e);
|
|
589
|
-
} catch {
|
|
590
|
-
return null;
|
|
591
|
-
}
|
|
592
|
-
return r.protocol !== "https:" && r.protocol !== "http:" ? null : Fe(r, t.remote ?? []) ? { kind: "remote", src: r.toString() } : null;
|
|
558
|
+
function Pt(e, t) {
|
|
559
|
+
return !e || He(e, t).allowed ? null : new Response("WebSocket origin not allowed.", {
|
|
560
|
+
status: 403
|
|
561
|
+
});
|
|
593
562
|
}
|
|
594
|
-
function
|
|
595
|
-
return t.some(
|
|
596
|
-
(
|
|
563
|
+
function _e(e, t, r) {
|
|
564
|
+
return e.origins === "same-origin" ? t === new URL(r.url).origin : e.origins.some(
|
|
565
|
+
(n) => Ve(n, t)
|
|
597
566
|
);
|
|
598
567
|
}
|
|
599
|
-
function
|
|
568
|
+
function Ve(e, t) {
|
|
569
|
+
return e === "null" ? t === "null" : P(e) === t;
|
|
570
|
+
}
|
|
571
|
+
function P(e) {
|
|
572
|
+
if (e === "null")
|
|
573
|
+
return e;
|
|
600
574
|
try {
|
|
601
|
-
|
|
575
|
+
if (e !== e.trim())
|
|
576
|
+
return null;
|
|
577
|
+
const t = e.indexOf("://");
|
|
578
|
+
if (t === -1)
|
|
579
|
+
return null;
|
|
580
|
+
const r = e.slice(t + 3);
|
|
581
|
+
if (!r || /[/?#]/.test(r))
|
|
582
|
+
return null;
|
|
583
|
+
const n = new URL(e);
|
|
584
|
+
return n.protocol !== "http:" && n.protocol !== "https:" || n.username || n.password ? null : n.origin;
|
|
602
585
|
} catch {
|
|
603
|
-
return
|
|
586
|
+
return null;
|
|
604
587
|
}
|
|
605
588
|
}
|
|
606
|
-
function
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
return e.filter((t) => t.source === "local" && t.src).map((t) => {
|
|
680
|
-
const r = t.src;
|
|
681
|
-
return [
|
|
682
|
-
"@font-face {",
|
|
683
|
-
` font-family: "${P(t.family)}";`,
|
|
684
|
-
` src: url("${P(r)}") format("${Ge(r)}");`,
|
|
685
|
-
` font-style: ${t.style};`,
|
|
686
|
-
` font-weight: ${t.weight};`,
|
|
687
|
-
` font-display: ${t.display};`,
|
|
688
|
-
"}"
|
|
689
|
-
].join(`
|
|
690
|
-
`);
|
|
691
|
-
}).join(`
|
|
692
|
-
`);
|
|
693
|
-
}
|
|
694
|
-
function Ve(e) {
|
|
695
|
-
return e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase() === "woff" ? "font/woff" : "font/woff2";
|
|
589
|
+
function We(e) {
|
|
590
|
+
const t = O(e.routes), r = e.loadNavigationData ?? F;
|
|
591
|
+
return function() {
|
|
592
|
+
const [a, i] = I(() => E()), [s, o] = I(
|
|
593
|
+
() => e.initialMatch ?? { status: "loading" }
|
|
594
|
+
), u = T(!!e.initialMatch), d = T(0);
|
|
595
|
+
C(() => {
|
|
596
|
+
function c() {
|
|
597
|
+
i(E());
|
|
598
|
+
}
|
|
599
|
+
return window.addEventListener("popstate", c), () => window.removeEventListener("popstate", c);
|
|
600
|
+
}, []), C(() => {
|
|
601
|
+
let c = !1, l = !1;
|
|
602
|
+
const m = ++d.current, R = new AbortController(), v = () => !c && m === d.current;
|
|
603
|
+
if (u.current && Ke(e.initialMatch) === a.pathname)
|
|
604
|
+
return u.current = !1, () => {
|
|
605
|
+
c = !0;
|
|
606
|
+
};
|
|
607
|
+
o({ status: "loading" }), ae(t, a.pathname).then((h) => {
|
|
608
|
+
v() && !l && h && o({ loading: h, status: "loading" });
|
|
609
|
+
}).catch(() => {
|
|
610
|
+
});
|
|
611
|
+
const k = new Request(a.href, { signal: R.signal });
|
|
612
|
+
return Promise.resolve(r(k)).then(
|
|
613
|
+
(h) => L(
|
|
614
|
+
t,
|
|
615
|
+
a.pathname,
|
|
616
|
+
k,
|
|
617
|
+
h,
|
|
618
|
+
void 0,
|
|
619
|
+
{ documentContributions: !1 }
|
|
620
|
+
)
|
|
621
|
+
).then((h) => {
|
|
622
|
+
l = !0, v() && o(h);
|
|
623
|
+
}).catch(async (h) => {
|
|
624
|
+
if (l = !0, !v() || R.signal.aborted)
|
|
625
|
+
return;
|
|
626
|
+
const q = await ie(
|
|
627
|
+
t,
|
|
628
|
+
a.pathname
|
|
629
|
+
);
|
|
630
|
+
v() && o({
|
|
631
|
+
Error: q,
|
|
632
|
+
error: h,
|
|
633
|
+
pathname: a.pathname,
|
|
634
|
+
status: "error"
|
|
635
|
+
});
|
|
636
|
+
}), () => {
|
|
637
|
+
c = !0, R.abort();
|
|
638
|
+
};
|
|
639
|
+
}, [a.pathname, a.search]);
|
|
640
|
+
const p = V(
|
|
641
|
+
() => ({
|
|
642
|
+
navigation: e.navigation ?? "server",
|
|
643
|
+
push(c) {
|
|
644
|
+
const l = E();
|
|
645
|
+
window.history.pushState(null, "", c);
|
|
646
|
+
const m = E();
|
|
647
|
+
i(m), l.pathname === m.pathname && l.search === m.search && l.hash !== m.hash && Je(m.hash);
|
|
648
|
+
}
|
|
649
|
+
}),
|
|
650
|
+
[]
|
|
651
|
+
);
|
|
652
|
+
return f(j.Provider, {
|
|
653
|
+
value: p,
|
|
654
|
+
children: f(Ze, {
|
|
655
|
+
key: `${a.pathname}${a.search}`,
|
|
656
|
+
Loading: e.loading,
|
|
657
|
+
NotFound: e.notFound,
|
|
658
|
+
match: s
|
|
659
|
+
})
|
|
660
|
+
});
|
|
661
|
+
};
|
|
696
662
|
}
|
|
697
|
-
function Ge(e) {
|
|
698
|
-
|
|
663
|
+
function Ge(e, t) {
|
|
664
|
+
const r = t.getAttribute(Z);
|
|
665
|
+
return e.status === "not-found" ? r === "not-found" : e.status === "ready" && r === null;
|
|
699
666
|
}
|
|
700
|
-
function
|
|
701
|
-
|
|
667
|
+
function Ke(e) {
|
|
668
|
+
if (e)
|
|
669
|
+
return e.status === "ready" ? e.match.pathname : e.status === "loading" ? void 0 : e.pathname;
|
|
702
670
|
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
671
|
+
async function Ut(e) {
|
|
672
|
+
const t = e.root ?? document.getElementById("root");
|
|
673
|
+
if (!t)
|
|
674
|
+
throw new Error(
|
|
675
|
+
"Demiurge expected a #root element in the framework document."
|
|
676
|
+
);
|
|
677
|
+
const r = O(e.routes), n = e.loadNavigationData ?? F, a = e.initialData ?? K(document), i = await L(
|
|
678
|
+
r,
|
|
679
|
+
window.location.pathname,
|
|
680
|
+
new Request(window.location.href),
|
|
681
|
+
a ?? await n(new Request(window.location.href)),
|
|
682
|
+
void 0,
|
|
683
|
+
{ documentContributions: !1 }
|
|
684
|
+
), s = Ge(i, t), o = We(
|
|
685
|
+
s ? {
|
|
686
|
+
...e,
|
|
687
|
+
initialMatch: i,
|
|
688
|
+
loadNavigationData: n,
|
|
689
|
+
navigation: a?.navigation ?? e.navigation
|
|
690
|
+
} : {
|
|
691
|
+
...e,
|
|
692
|
+
loadNavigationData: n,
|
|
693
|
+
navigation: a?.navigation ?? e.navigation
|
|
694
|
+
}
|
|
695
|
+
), { createRoot: u, hydrateRoot: d } = Ye(
|
|
696
|
+
await import("react-dom/client")
|
|
697
|
+
);
|
|
698
|
+
if (s && t.hasAttribute(Y)) {
|
|
699
|
+
d(t, f(o));
|
|
700
|
+
return;
|
|
720
701
|
}
|
|
721
|
-
|
|
722
|
-
function Ke(e) {
|
|
723
|
-
const t = e.trim();
|
|
724
|
-
if (!t || t.includes("/") || t.includes(" "))
|
|
725
|
-
throw new Error("Analytics domain must be a hostname without a path.");
|
|
726
|
-
return t;
|
|
702
|
+
t.replaceChildren(), u(t).render(f(o));
|
|
727
703
|
}
|
|
728
704
|
function Ye(e) {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}
|
|
735
|
-
if (t.protocol !== "https:")
|
|
736
|
-
throw new Error("Analytics endpoint must use HTTPS.");
|
|
705
|
+
const t = typeof e.createRoot == "function" && typeof e.hydrateRoot == "function" ? e : e.default;
|
|
706
|
+
if (!t || typeof t.createRoot != "function" || typeof t.hydrateRoot != "function")
|
|
707
|
+
throw new Error(
|
|
708
|
+
"Demiurge could not load the React DOM client from the Vite module."
|
|
709
|
+
);
|
|
737
710
|
return t;
|
|
738
711
|
}
|
|
739
|
-
function
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
async reportWebVitals(t) {
|
|
751
|
-
await E({ kind: "web-vital", signal: t }, e);
|
|
712
|
+
function Ft(e) {
|
|
713
|
+
const t = tt(), r = ne(e);
|
|
714
|
+
return /* @__PURE__ */ H(
|
|
715
|
+
"a",
|
|
716
|
+
{
|
|
717
|
+
className: e.className,
|
|
718
|
+
href: r,
|
|
719
|
+
onClick: (n) => {
|
|
720
|
+
t.navigation === "server" && et(n) && (n.preventDefault(), t.push(r));
|
|
721
|
+
},
|
|
722
|
+
children: e.children
|
|
752
723
|
}
|
|
753
|
-
|
|
754
|
-
}
|
|
755
|
-
async function E(e, t) {
|
|
756
|
-
await t.onEvent?.(e), e.kind === "request" ? await t.request?.(e.signal) : e.kind === "server-start" ? await t.serverStart?.(e.signal) : e.kind === "trace" ? await t.trace?.(e.signal) : await t.webVitals?.(e.signal);
|
|
757
|
-
}
|
|
758
|
-
const Ze = /* @__PURE__ */ new Set(["DELETE", "PATCH", "POST", "PUT"]);
|
|
759
|
-
function ir(e = {}) {
|
|
760
|
-
const t = [], r = e.document, n = r ? Je(r.policy, r.headers, t) : {};
|
|
761
|
-
r && Qe(r.policy, t);
|
|
762
|
-
const a = e.route ? ot(e.route, t) : void 0;
|
|
763
|
-
return r?.scripts && (et(
|
|
764
|
-
r.policy.csp,
|
|
765
|
-
r.scripts,
|
|
766
|
-
r.headers,
|
|
767
|
-
t
|
|
768
|
-
), r.scriptDependencies && t.push(
|
|
769
|
-
...Xe(
|
|
770
|
-
r.scripts,
|
|
771
|
-
tt(r.scriptDependencies)
|
|
772
|
-
)
|
|
773
|
-
)), {
|
|
774
|
-
findings: t,
|
|
775
|
-
headers: n,
|
|
776
|
-
route: a
|
|
777
|
-
};
|
|
724
|
+
);
|
|
778
725
|
}
|
|
779
|
-
function
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
726
|
+
function Ze({
|
|
727
|
+
Loading: e,
|
|
728
|
+
NotFound: t,
|
|
729
|
+
match: r
|
|
730
|
+
}) {
|
|
731
|
+
if (r.status === "loading") {
|
|
732
|
+
const c = r.loading ?? e;
|
|
733
|
+
return c ? f(c) : null;
|
|
734
|
+
}
|
|
735
|
+
if (r.status === "not-found") {
|
|
736
|
+
const c = r.notFound ?? t ?? de;
|
|
737
|
+
return r.layouts.reduceRight(
|
|
738
|
+
(l, m) => f(m, {
|
|
739
|
+
children: l,
|
|
740
|
+
path: {},
|
|
741
|
+
pathname: r.pathname
|
|
742
|
+
}),
|
|
743
|
+
f(c, { pathname: r.pathname })
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
if (r.status === "error")
|
|
747
|
+
return r.Error ? f(r.Error, {
|
|
748
|
+
error: r.error,
|
|
749
|
+
pathname: r.pathname,
|
|
750
|
+
status: U(r.error)
|
|
751
|
+
}) : null;
|
|
752
|
+
const { data: n, error: a, page: i, layouts: s, path: o, pathname: u } = r.match, d = f(i, { data: n, path: o, pathname: u }), p = s.reduceRight(
|
|
753
|
+
(c, l) => f(l, { path: o, pathname: u, children: c }),
|
|
754
|
+
d
|
|
755
|
+
);
|
|
756
|
+
return f(Qe, {
|
|
757
|
+
Error: a,
|
|
758
|
+
children: p,
|
|
759
|
+
pathname: u
|
|
787
760
|
});
|
|
788
761
|
}
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
const i = lt(a);
|
|
793
|
-
i && (r && !a.purpose && n.push({
|
|
794
|
-
code: "script-purpose-missing",
|
|
795
|
-
message: `Third-party script ${a.src} should declare a purpose for audits and consent flows.`,
|
|
796
|
-
severity: "warning"
|
|
797
|
-
}), t.requireIntegrity && !a.integrity && n.push({
|
|
798
|
-
code: "script-integrity-missing",
|
|
799
|
-
message: `Third-party script ${a.src} should declare an integrity hash or an explicit trust-boundary exception.`,
|
|
800
|
-
severity: "warning"
|
|
801
|
-
}), a.strategy === "beforeInteractive" && !t.allowBeforeInteractiveThirdParty && n.push({
|
|
802
|
-
code: "script-third-party-before-interactive",
|
|
803
|
-
message: `Third-party script ${a.src} runs before the app is interactive and should be justified by policy.`,
|
|
804
|
-
severity: "warning"
|
|
805
|
-
}), ft(i) && n.push({
|
|
806
|
-
code: "script-gtm-wide-trust-boundary",
|
|
807
|
-
message: "Google Tag Manager can load additional scripts at runtime and should be treated as a wide trust boundary.",
|
|
808
|
-
severity: "warning"
|
|
809
|
-
}));
|
|
762
|
+
class Qe extends G {
|
|
763
|
+
static getDerivedStateFromError(t) {
|
|
764
|
+
return { error: t };
|
|
810
765
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
try {
|
|
815
|
-
return Object.fromEntries(de(e, t));
|
|
816
|
-
} catch (n) {
|
|
817
|
-
return r.push({
|
|
818
|
-
code: "security-header-render-failed",
|
|
819
|
-
message: n instanceof Error ? n.message : "Security headers failed to render.",
|
|
820
|
-
severity: "error"
|
|
821
|
-
}), {};
|
|
766
|
+
state = {};
|
|
767
|
+
componentDidUpdate(t) {
|
|
768
|
+
this.state.error !== void 0 && t.pathname !== this.props.pathname && this.setState({ error: void 0 });
|
|
822
769
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
if (nt(a) && !i.nonce) {
|
|
830
|
-
n.push({
|
|
831
|
-
code: "csp-script-missing-nonce",
|
|
832
|
-
message: `Document script ${i.src} needs a nonce for the effective script-src policy.`,
|
|
833
|
-
severity: "error"
|
|
834
|
-
});
|
|
835
|
-
continue;
|
|
836
|
-
}
|
|
837
|
-
i.nonce && r?.nonce && i.nonce === r.nonce || at(a, i.src) || n.push({
|
|
838
|
-
code: "csp-script-src-blocked",
|
|
839
|
-
message: `Document script ${i.src} is not allowed by the effective script-src policy.`,
|
|
840
|
-
severity: "error"
|
|
841
|
-
});
|
|
770
|
+
render() {
|
|
771
|
+
return this.state.error !== void 0 ? this.props.Error ? f(this.props.Error, {
|
|
772
|
+
error: this.state.error,
|
|
773
|
+
pathname: this.props.pathname,
|
|
774
|
+
status: U(this.state.error)
|
|
775
|
+
}) : null : this.props.children;
|
|
842
776
|
}
|
|
843
777
|
}
|
|
844
|
-
function
|
|
845
|
-
return
|
|
778
|
+
function U(e) {
|
|
779
|
+
return me(e) ? e.status : 500;
|
|
846
780
|
}
|
|
847
|
-
function
|
|
848
|
-
return
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
return e.includes("*") ? !0 : e.includes("'none'") || e.some((r) => r.startsWith("'nonce-")) ? !1 : e.includes("'self'") && it(t) || t.startsWith("https:") && e.includes("https:") || t.startsWith("http:") && e.includes("http:") ? !0 : e.some((r) => st(r, t));
|
|
781
|
+
function E() {
|
|
782
|
+
return {
|
|
783
|
+
hash: window.location.hash,
|
|
784
|
+
href: window.location.href,
|
|
785
|
+
pathname: window.location.pathname,
|
|
786
|
+
search: window.location.search
|
|
787
|
+
};
|
|
855
788
|
}
|
|
856
|
-
function
|
|
857
|
-
|
|
789
|
+
async function F(e) {
|
|
790
|
+
const t = new Headers(e.headers);
|
|
791
|
+
t.set("accept", "application/json"), t.set(D, oe);
|
|
792
|
+
const r = await fetch(new Request(e, {
|
|
793
|
+
credentials: "same-origin",
|
|
794
|
+
headers: t
|
|
795
|
+
})), n = r.headers.get(D);
|
|
796
|
+
if (n === se) {
|
|
797
|
+
const a = await r.json();
|
|
798
|
+
if (a.hasData !== !0)
|
|
799
|
+
throw new Error("Demiurge received malformed navigation route data.");
|
|
800
|
+
return { data: a.data, hasData: !0 };
|
|
801
|
+
}
|
|
802
|
+
if (n === ce)
|
|
803
|
+
return { hasData: !0 };
|
|
804
|
+
if (n === ue || !r.ok) {
|
|
805
|
+
const a = await Xe(r), i = le.includes(
|
|
806
|
+
r.status
|
|
807
|
+
) ? r.status : 500;
|
|
808
|
+
throw fe(i, {
|
|
809
|
+
detail: typeof a?.detail == "string" ? a.detail : void 0,
|
|
810
|
+
title: typeof a?.title == "string" ? a.title : void 0
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
throw new Error(
|
|
814
|
+
"Demiurge expected a navigation data response from the application server."
|
|
815
|
+
);
|
|
858
816
|
}
|
|
859
|
-
function
|
|
860
|
-
if (e.startsWith("'"))
|
|
861
|
-
return !1;
|
|
817
|
+
async function Xe(e) {
|
|
862
818
|
try {
|
|
863
|
-
|
|
864
|
-
return n.protocol === r.protocol && n.hostname === r.hostname && n.port === r.port && (r.pathname === "/" || n.pathname.startsWith(r.pathname));
|
|
819
|
+
return await e.json();
|
|
865
820
|
} catch {
|
|
866
|
-
return
|
|
821
|
+
return;
|
|
867
822
|
}
|
|
868
823
|
}
|
|
869
|
-
function
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
};
|
|
875
|
-
}
|
|
876
|
-
function ct(e, t) {
|
|
877
|
-
if (e)
|
|
878
|
-
try {
|
|
879
|
-
he(e);
|
|
880
|
-
} catch (r) {
|
|
881
|
-
t.push({
|
|
882
|
-
code: "cors-invalid",
|
|
883
|
-
message: r instanceof Error ? r.message : "CORS policy is invalid.",
|
|
884
|
-
severity: "error"
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
function ut(e, t, r) {
|
|
889
|
-
Ze.has(e) && (t?.csrf === !1 && r.push({
|
|
890
|
-
code: "csrf-disabled",
|
|
891
|
-
message: "CSRF protection is explicitly disabled for this unsafe route.",
|
|
892
|
-
severity: "info"
|
|
893
|
-
}), t?.rateLimit || r.push({
|
|
894
|
-
code: "rate-limit-missing",
|
|
895
|
-
message: "Unsafe routes should declare rate limiting.",
|
|
896
|
-
severity: "warning"
|
|
897
|
-
}), t?.request?.maxBodySize || r.push({
|
|
898
|
-
code: "request-body-limit-missing",
|
|
899
|
-
message: "Unsafe routes should declare a request body size limit.",
|
|
900
|
-
severity: "warning"
|
|
901
|
-
}));
|
|
902
|
-
}
|
|
903
|
-
function lt(e) {
|
|
904
|
-
try {
|
|
905
|
-
const t = new URL(e.src);
|
|
906
|
-
if (t.protocol === "http:" || t.protocol === "https:")
|
|
907
|
-
return t;
|
|
908
|
-
} catch {
|
|
909
|
-
return null;
|
|
910
|
-
}
|
|
911
|
-
return null;
|
|
912
|
-
}
|
|
913
|
-
function ft(e) {
|
|
914
|
-
return e.hostname === "www.googletagmanager.com" && (e.pathname === "/gtm.js" || e.pathname === "/ns.html");
|
|
915
|
-
}
|
|
916
|
-
class dt extends Error {
|
|
917
|
-
issues;
|
|
918
|
-
constructor(t) {
|
|
919
|
-
super(vt(t)), this.name = "EnvValidationError", this.issues = t;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
function sr(e) {
|
|
923
|
-
return e;
|
|
924
|
-
}
|
|
925
|
-
function or(e, t) {
|
|
926
|
-
const r = [], n = {};
|
|
927
|
-
for (const a of Object.keys(e)) {
|
|
928
|
-
const i = e[a], o = t[String(a)];
|
|
929
|
-
if (o === void 0 || o === "") {
|
|
930
|
-
if (i.optional) {
|
|
931
|
-
n[a] = void 0;
|
|
932
|
-
continue;
|
|
933
|
-
}
|
|
934
|
-
r.push({
|
|
935
|
-
code: "missing",
|
|
936
|
-
key: String(a),
|
|
937
|
-
message: `Environment variable ${String(a)} is required.`
|
|
938
|
-
});
|
|
939
|
-
continue;
|
|
824
|
+
function Je(e) {
|
|
825
|
+
queueMicrotask(() => {
|
|
826
|
+
if (!e) {
|
|
827
|
+
window.scrollTo?.(0, 0);
|
|
828
|
+
return;
|
|
940
829
|
}
|
|
830
|
+
let t;
|
|
941
831
|
try {
|
|
942
|
-
|
|
943
|
-
} catch
|
|
944
|
-
|
|
945
|
-
code: "invalid",
|
|
946
|
-
key: String(a),
|
|
947
|
-
message: s instanceof Error ? s.message : `Environment variable ${String(a)} is invalid.`
|
|
948
|
-
});
|
|
832
|
+
t = decodeURIComponent(e.slice(1));
|
|
833
|
+
} catch {
|
|
834
|
+
t = e.slice(1);
|
|
949
835
|
}
|
|
950
|
-
|
|
951
|
-
if (r.length)
|
|
952
|
-
throw new dt(r);
|
|
953
|
-
return n;
|
|
954
|
-
}
|
|
955
|
-
function ht(e = {}) {
|
|
956
|
-
return y(e, !1, (t, r) => {
|
|
957
|
-
if (r === "true" || r === "1")
|
|
958
|
-
return !0;
|
|
959
|
-
if (r === "false" || r === "0")
|
|
960
|
-
return !1;
|
|
961
|
-
throw new Error(`Environment variable ${t} must be true, false, 1, or 0.`);
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
function mt(e, t = {}) {
|
|
965
|
-
return y(t, !1, (r, n) => {
|
|
966
|
-
if (e.includes(n))
|
|
967
|
-
return n;
|
|
968
|
-
throw new Error(
|
|
969
|
-
`Environment variable ${r} must be one of: ${e.join(", ")}.`
|
|
970
|
-
);
|
|
836
|
+
document.getElementById(t)?.scrollIntoView?.();
|
|
971
837
|
});
|
|
972
838
|
}
|
|
973
|
-
function
|
|
974
|
-
return
|
|
975
|
-
if (!/^-?\d+$/.test(r))
|
|
976
|
-
throw new Error(`Environment variable ${t} must be an integer.`);
|
|
977
|
-
const n = Number(r);
|
|
978
|
-
if (!Number.isSafeInteger(n))
|
|
979
|
-
throw new Error(`Environment variable ${t} must be a safe integer.`);
|
|
980
|
-
if (e.min !== void 0 && n < e.min)
|
|
981
|
-
throw new Error(
|
|
982
|
-
`Environment variable ${t} must be greater than or equal to ${e.min}.`
|
|
983
|
-
);
|
|
984
|
-
if (e.max !== void 0 && n > e.max)
|
|
985
|
-
throw new Error(
|
|
986
|
-
`Environment variable ${t} must be less than or equal to ${e.max}.`
|
|
987
|
-
);
|
|
988
|
-
return n;
|
|
989
|
-
});
|
|
839
|
+
function et(e) {
|
|
840
|
+
return e.button === 0 && !e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey;
|
|
990
841
|
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
842
|
+
const j = _({
|
|
843
|
+
navigation: "document",
|
|
844
|
+
push(e) {
|
|
845
|
+
window.location.href = e;
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
function tt() {
|
|
849
|
+
return W(j);
|
|
997
850
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
!1,
|
|
1002
|
-
(t, r) => j(t, r, e)
|
|
1003
|
-
);
|
|
851
|
+
const rt = "/_demiurge/image";
|
|
852
|
+
function jt(e) {
|
|
853
|
+
return e;
|
|
1004
854
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return
|
|
1007
|
-
let n;
|
|
1008
|
-
try {
|
|
1009
|
-
n = new URL(r);
|
|
1010
|
-
} catch {
|
|
1011
|
-
throw new Error(`Environment variable ${t} must be a valid URL.`);
|
|
1012
|
-
}
|
|
1013
|
-
if (e.protocols?.length && !e.protocols.includes(n.protocol))
|
|
1014
|
-
throw new Error(
|
|
1015
|
-
`Environment variable ${t} must use one of these protocols: ${e.protocols.join(", ")}.`
|
|
1016
|
-
);
|
|
1017
|
-
return n;
|
|
1018
|
-
});
|
|
855
|
+
function Bt(e, t = {}) {
|
|
856
|
+
return B(e, t) !== null;
|
|
1019
857
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
858
|
+
function qt(e, t = {}) {
|
|
859
|
+
const r = B(e.src, t);
|
|
860
|
+
if (!r)
|
|
861
|
+
throw new Error(`Image source "${e.src}" is not allowed by the image policy.`);
|
|
862
|
+
$("width", e.width), $("height", e.height), st(e.quality);
|
|
863
|
+
const n = e.format ?? "auto", i = ct(e.width, e.widths).map((o) => {
|
|
864
|
+
const u = Math.round(e.height / e.width * o);
|
|
865
|
+
return {
|
|
866
|
+
format: n,
|
|
867
|
+
height: u,
|
|
868
|
+
src: ut({
|
|
869
|
+
format: n,
|
|
870
|
+
optimizerPath: t.optimizerPath ?? rt,
|
|
871
|
+
quality: e.quality,
|
|
872
|
+
src: e.src,
|
|
873
|
+
width: o
|
|
874
|
+
}),
|
|
875
|
+
width: o
|
|
876
|
+
};
|
|
877
|
+
}), s = i[0];
|
|
1029
878
|
return {
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
879
|
+
alt: e.alt,
|
|
880
|
+
decoding: "async",
|
|
881
|
+
fetchPriority: e.priority ? "high" : void 0,
|
|
882
|
+
height: e.height,
|
|
883
|
+
loading: e.priority ? "eager" : "lazy",
|
|
884
|
+
sizes: e.sizes,
|
|
885
|
+
source: r,
|
|
886
|
+
src: s.src,
|
|
887
|
+
srcSet: i.map((o) => `${o.src} ${o.width}w`).join(", "),
|
|
888
|
+
variants: i,
|
|
889
|
+
width: e.width
|
|
1033
890
|
};
|
|
1034
891
|
}
|
|
1035
|
-
function
|
|
1036
|
-
if (
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
892
|
+
function B(e, t) {
|
|
893
|
+
if (e.startsWith("/") && !e.startsWith("//"))
|
|
894
|
+
return t.local === !1 ? null : { kind: "local", src: e };
|
|
895
|
+
let r;
|
|
896
|
+
try {
|
|
897
|
+
r = new URL(e);
|
|
898
|
+
} catch {
|
|
899
|
+
return null;
|
|
900
|
+
}
|
|
901
|
+
return r.protocol !== "https:" && r.protocol !== "http:" ? null : nt(r, t.remote ?? []) ? { kind: "remote", src: r.toString() } : null;
|
|
1041
902
|
}
|
|
1042
|
-
function
|
|
1043
|
-
return
|
|
903
|
+
function nt(e, t) {
|
|
904
|
+
return t.some(
|
|
905
|
+
(r) => typeof r == "string" ? at(e, r) : it(e, r)
|
|
906
|
+
);
|
|
1044
907
|
}
|
|
1045
|
-
function
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
},
|
|
1052
|
-
status: 405
|
|
1053
|
-
});
|
|
1054
|
-
const n = St(r);
|
|
1055
|
-
if (n)
|
|
1056
|
-
return n;
|
|
1057
|
-
const a = Et(e, r);
|
|
1058
|
-
if (a)
|
|
1059
|
-
return a;
|
|
1060
|
-
e.maxBodySize !== void 0 && (r = me({ maxBodySize: e.maxBodySize }, r));
|
|
1061
|
-
let i;
|
|
1062
|
-
try {
|
|
1063
|
-
i = await r.json();
|
|
1064
|
-
} catch (s) {
|
|
1065
|
-
return s instanceof pe ? new Response("Security report body too large.", { status: 413 }) : new Response("Invalid security report JSON.", {
|
|
1066
|
-
status: 400
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
const o = Rt(i);
|
|
1070
|
-
for (let s = 0; s < o.length; s += 1)
|
|
1071
|
-
await e.onReport?.(o[s], {
|
|
1072
|
-
index: s,
|
|
1073
|
-
request: r
|
|
1074
|
-
});
|
|
1075
|
-
return new Response(null, {
|
|
1076
|
-
status: 204
|
|
1077
|
-
});
|
|
1078
|
-
};
|
|
908
|
+
function at(e, t) {
|
|
909
|
+
try {
|
|
910
|
+
return e.origin === new URL(t).origin;
|
|
911
|
+
} catch {
|
|
912
|
+
return !1;
|
|
913
|
+
}
|
|
1079
914
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
"application/reports+json"
|
|
1083
|
-
]);
|
|
1084
|
-
function St(e) {
|
|
1085
|
-
const t = e.headers.get("content-type");
|
|
1086
|
-
if (!t)
|
|
1087
|
-
return null;
|
|
1088
|
-
const r = t.split(";", 1)[0]?.trim().toLowerCase();
|
|
1089
|
-
return r && bt.has(r) ? null : new Response("Unsupported security report Content-Type.", {
|
|
1090
|
-
status: 415
|
|
1091
|
-
});
|
|
915
|
+
function it(e, t) {
|
|
916
|
+
return t.protocol && e.protocol !== t.protocol || e.hostname !== t.hostname || t.port !== void 0 && e.port !== t.port ? !1 : t.pathname ? ot(e.pathname, t.pathname) : !0;
|
|
1092
917
|
}
|
|
1093
|
-
function
|
|
1094
|
-
|
|
1095
|
-
return null;
|
|
1096
|
-
const r = t.headers.get("content-length");
|
|
1097
|
-
if (!r)
|
|
1098
|
-
return null;
|
|
1099
|
-
if (!/^\d+$/.test(r))
|
|
1100
|
-
return new Response("Invalid Content-Length.", {
|
|
1101
|
-
status: 400
|
|
1102
|
-
});
|
|
1103
|
-
const n = Number(r);
|
|
1104
|
-
return Number.isSafeInteger(n) ? n > A(e.maxBodySize) ? new Response("Security report body too large.", {
|
|
1105
|
-
status: 413
|
|
1106
|
-
}) : null : new Response("Invalid Content-Length.", {
|
|
1107
|
-
status: 400
|
|
1108
|
-
});
|
|
918
|
+
function ot(e, t) {
|
|
919
|
+
return t.endsWith("*") ? e.startsWith(t.slice(0, -1)) : e === t;
|
|
1109
920
|
}
|
|
1110
|
-
function
|
|
1111
|
-
|
|
921
|
+
function $(e, t) {
|
|
922
|
+
if (!Number.isInteger(t) || t <= 0)
|
|
923
|
+
throw new Error(`Image ${e} must be a positive integer.`);
|
|
1112
924
|
}
|
|
1113
|
-
function
|
|
1114
|
-
|
|
925
|
+
function st(e) {
|
|
926
|
+
if (e !== void 0 && (!Number.isInteger(e) || e < 1 || e > 100))
|
|
927
|
+
throw new Error("Image quality must be an integer between 1 and 100.");
|
|
1115
928
|
}
|
|
1116
|
-
function
|
|
1117
|
-
const r =
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
r[i] = s, o.required && s.length === 0 && n.push({
|
|
1122
|
-
code: "file-missing",
|
|
1123
|
-
field: i,
|
|
1124
|
-
message: `Upload field ${i} requires at least one file.`
|
|
1125
|
-
});
|
|
1126
|
-
for (const u of s)
|
|
1127
|
-
a += u.size, xt(i, u, o, n);
|
|
1128
|
-
}
|
|
1129
|
-
return t.maxTotalSize !== void 0 && a > A(t.maxTotalSize) && n.push({
|
|
1130
|
-
code: "total-upload-too-large",
|
|
1131
|
-
field: "*",
|
|
1132
|
-
message: `Uploaded files exceed the maximum total size of ${t.maxTotalSize}.`
|
|
1133
|
-
}), {
|
|
1134
|
-
files: r,
|
|
1135
|
-
issues: n,
|
|
1136
|
-
ok: n.length === 0,
|
|
1137
|
-
totalSize: a
|
|
1138
|
-
};
|
|
929
|
+
function ct(e, t) {
|
|
930
|
+
const r = t ?? [e, e * 2], n = [...new Set(r)];
|
|
931
|
+
for (const a of n)
|
|
932
|
+
$("width", a);
|
|
933
|
+
return n.sort((a, i) => a - i);
|
|
1139
934
|
}
|
|
1140
|
-
function
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
935
|
+
function ut({
|
|
936
|
+
format: e,
|
|
937
|
+
optimizerPath: t,
|
|
938
|
+
quality: r,
|
|
939
|
+
src: n,
|
|
940
|
+
width: a
|
|
941
|
+
}) {
|
|
942
|
+
const i = new URLSearchParams({
|
|
943
|
+
src: n,
|
|
944
|
+
w: String(a)
|
|
1149
945
|
});
|
|
946
|
+
return r !== void 0 && i.set("q", String(r)), e !== "auto" && i.set("f", e), `${t}?${i.toString()}`;
|
|
1150
947
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1154
|
-
function Tt(e) {
|
|
1155
|
-
return e instanceof File;
|
|
1156
|
-
}
|
|
1157
|
-
function It(e, t) {
|
|
1158
|
-
const r = t.headers.get("origin");
|
|
1159
|
-
if (!r)
|
|
948
|
+
const Ht = {
|
|
949
|
+
google(e) {
|
|
1160
950
|
return {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
951
|
+
display: e.display ?? "swap",
|
|
952
|
+
family: e.family,
|
|
953
|
+
kind: "font",
|
|
954
|
+
source: "google",
|
|
955
|
+
src: e.src,
|
|
956
|
+
style: e.style ?? "normal",
|
|
957
|
+
weight: e.weight ?? 400
|
|
1165
958
|
};
|
|
1166
|
-
|
|
1167
|
-
|
|
959
|
+
},
|
|
960
|
+
local(e) {
|
|
961
|
+
if (!e.src.trim())
|
|
962
|
+
throw new Error("Local font source must not be empty.");
|
|
1168
963
|
return {
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
964
|
+
display: e.display ?? "swap",
|
|
965
|
+
family: e.name,
|
|
966
|
+
kind: "font",
|
|
967
|
+
source: "local",
|
|
968
|
+
src: e.src,
|
|
969
|
+
style: e.style ?? "normal",
|
|
970
|
+
weight: e.weight ?? 400
|
|
1173
971
|
};
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
origin: n,
|
|
1179
|
-
reason: a ? void 0 : "origin-not-allowed"
|
|
1180
|
-
};
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
function _t(e) {
|
|
975
|
+
return [...e];
|
|
1181
976
|
}
|
|
1182
|
-
function
|
|
1183
|
-
return
|
|
1184
|
-
|
|
1185
|
-
|
|
977
|
+
function Vt(e) {
|
|
978
|
+
return e.filter((t) => t.src).map((t) => ({
|
|
979
|
+
as: "font",
|
|
980
|
+
crossOrigin: "anonymous",
|
|
981
|
+
href: t.src,
|
|
982
|
+
kind: "link",
|
|
983
|
+
rel: "preload",
|
|
984
|
+
type: lt(t.src)
|
|
985
|
+
}));
|
|
1186
986
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return e.
|
|
1189
|
-
|
|
1190
|
-
|
|
987
|
+
function Wt(e) {
|
|
988
|
+
return e.filter((t) => t.source === "local" && t.src).map((t) => {
|
|
989
|
+
const r = t.src;
|
|
990
|
+
return [
|
|
991
|
+
"@font-face {",
|
|
992
|
+
` font-family: "${N(t.family)}";`,
|
|
993
|
+
` src: url("${N(r)}") format("${ft(r)}");`,
|
|
994
|
+
` font-style: ${t.style};`,
|
|
995
|
+
` font-weight: ${t.weight};`,
|
|
996
|
+
` font-display: ${t.display};`,
|
|
997
|
+
"}"
|
|
998
|
+
].join(`
|
|
999
|
+
`);
|
|
1000
|
+
}).join(`
|
|
1001
|
+
`);
|
|
1191
1002
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return e === "
|
|
1003
|
+
function lt(e) {
|
|
1004
|
+
return e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase() === "woff" ? "font/woff" : "font/woff2";
|
|
1194
1005
|
}
|
|
1195
|
-
function
|
|
1196
|
-
|
|
1197
|
-
|
|
1006
|
+
function ft(e) {
|
|
1007
|
+
return e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase() === "woff" ? "woff" : "woff2";
|
|
1008
|
+
}
|
|
1009
|
+
function N(e) {
|
|
1010
|
+
return e.replace(/[\\"]/g, "\\$&");
|
|
1011
|
+
}
|
|
1012
|
+
const Gt = {
|
|
1013
|
+
plausible(e) {
|
|
1014
|
+
const t = dt(e.domain), r = mt(e.endpoint ?? "https://plausible.io");
|
|
1015
|
+
return {
|
|
1016
|
+
connectSrc: r.origin,
|
|
1017
|
+
consent: e.consent ?? !1,
|
|
1018
|
+
domain: t,
|
|
1019
|
+
kind: "analytics",
|
|
1020
|
+
provider: "plausible",
|
|
1021
|
+
script: Q({
|
|
1022
|
+
dataApi: `${r.origin}/api/event`,
|
|
1023
|
+
dataDomain: t,
|
|
1024
|
+
purpose: "analytics",
|
|
1025
|
+
src: `${r.origin}/js/script.js`,
|
|
1026
|
+
strategy: e.strategy ?? "afterInteractive"
|
|
1027
|
+
})
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
function dt(e) {
|
|
1032
|
+
const t = e.trim();
|
|
1033
|
+
if (!t || t.includes("/") || t.includes(" "))
|
|
1034
|
+
throw new Error("Analytics domain must be a hostname without a path.");
|
|
1035
|
+
return t;
|
|
1036
|
+
}
|
|
1037
|
+
function mt(e) {
|
|
1038
|
+
let t;
|
|
1198
1039
|
try {
|
|
1199
|
-
|
|
1200
|
-
return null;
|
|
1201
|
-
const t = e.indexOf("://");
|
|
1202
|
-
if (t === -1)
|
|
1203
|
-
return null;
|
|
1204
|
-
const r = e.slice(t + 3);
|
|
1205
|
-
if (!r || /[/?#]/.test(r))
|
|
1206
|
-
return null;
|
|
1207
|
-
const n = new URL(e);
|
|
1208
|
-
return n.protocol !== "http:" && n.protocol !== "https:" || n.username || n.password ? null : n.origin;
|
|
1040
|
+
t = new URL(e);
|
|
1209
1041
|
} catch {
|
|
1210
|
-
|
|
1042
|
+
throw new Error("Analytics endpoint must be an absolute URL.");
|
|
1211
1043
|
}
|
|
1044
|
+
if (t.protocol !== "https:")
|
|
1045
|
+
throw new Error("Analytics endpoint must use HTTPS.");
|
|
1046
|
+
return t;
|
|
1047
|
+
}
|
|
1048
|
+
function Kt(e = {}) {
|
|
1049
|
+
return {
|
|
1050
|
+
async request(t) {
|
|
1051
|
+
await S({ kind: "request", signal: t }, e);
|
|
1052
|
+
},
|
|
1053
|
+
async serverStart(t = {}) {
|
|
1054
|
+
await S({ kind: "server-start", signal: t }, e);
|
|
1055
|
+
},
|
|
1056
|
+
async trace(t) {
|
|
1057
|
+
await S({ kind: "trace", signal: t }, e);
|
|
1058
|
+
},
|
|
1059
|
+
async reportWebVitals(t) {
|
|
1060
|
+
await S({ kind: "web-vital", signal: t }, e);
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
async function S(e, t) {
|
|
1065
|
+
await t.onEvent?.(e), e.kind === "request" ? await t.request?.(e.signal) : e.kind === "server-start" ? await t.serverStart?.(e.signal) : e.kind === "trace" ? await t.trace?.(e.signal) : await t.webVitals?.(e.signal);
|
|
1212
1066
|
}
|
|
1213
1067
|
export {
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
er as
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1068
|
+
ke as EnvValidationError,
|
|
1069
|
+
le as HTTP_ERROR_STATUSES,
|
|
1070
|
+
ir as HttpError,
|
|
1071
|
+
Ft as Link,
|
|
1072
|
+
Qt as Script,
|
|
1073
|
+
kt as action,
|
|
1074
|
+
It as actionInput,
|
|
1075
|
+
Gt as analytics,
|
|
1076
|
+
Xt as assertAdapterCapabilities,
|
|
1077
|
+
or as auditScriptDependencies,
|
|
1078
|
+
Jt as checkAdapterCapabilities,
|
|
1079
|
+
He as checkWebSocketOrigin,
|
|
1080
|
+
sr as createCache,
|
|
1081
|
+
cr as createCorsHeaders,
|
|
1082
|
+
ur as createCsrfCookie,
|
|
1083
|
+
lr as createCsrfToken,
|
|
1084
|
+
We as createFileRouter,
|
|
1085
|
+
fr as createInvalidation,
|
|
1086
|
+
dr as createMemoryCache,
|
|
1087
|
+
mr as createMemoryCacheStore,
|
|
1088
|
+
vt as createMemoryIdempotencyStore,
|
|
1089
|
+
hr as createMemoryRateLimitStore,
|
|
1090
|
+
gr as createRequestHandler,
|
|
1091
|
+
pr as createSecurityAudit,
|
|
1092
|
+
wr as createSecurityHeaders,
|
|
1093
|
+
Lt as createSecurityReportHandler,
|
|
1094
|
+
yr as cspHash,
|
|
1095
|
+
vr as cspNonce,
|
|
1096
|
+
er as defineAdapter,
|
|
1097
|
+
Dt as defineEnvSchema,
|
|
1098
|
+
_t as defineFonts,
|
|
1099
|
+
jt as defineImages,
|
|
1100
|
+
Kt as defineInstrumentation,
|
|
1101
|
+
br as defineLinks,
|
|
1102
|
+
Er as defineMetadata,
|
|
1103
|
+
Ct as defineMiddleware,
|
|
1104
|
+
At as defineOgImage,
|
|
1105
|
+
Rt as defineRobots,
|
|
1106
|
+
Sr as defineRoutePolicy,
|
|
1107
|
+
tr as defineScripts,
|
|
1108
|
+
Rr as defineSecurityPolicy,
|
|
1109
|
+
Et as defineSitemap,
|
|
1110
|
+
Ar as defineTags,
|
|
1111
|
+
$r as enforceAllowedMethods,
|
|
1112
|
+
xr as enforceCsrfProtection,
|
|
1113
|
+
kr as enforceRateLimit,
|
|
1114
|
+
Ir as enforceRequestSecurity,
|
|
1115
|
+
Pt as enforceWebSocketOrigin,
|
|
1116
|
+
Ot as env,
|
|
1117
|
+
Ht as font,
|
|
1118
|
+
Vt as fontPreloadLinks,
|
|
1119
|
+
Tr as handleRequestWithManifest,
|
|
1120
|
+
ne as href,
|
|
1121
|
+
Cr as html,
|
|
1122
|
+
fe as httpError,
|
|
1123
|
+
Ut as hydrateFileRouter,
|
|
1124
|
+
Bt as isAllowedImageSource,
|
|
1125
|
+
me as isHttpError,
|
|
1126
|
+
zr as issueCsrfToken,
|
|
1127
|
+
Dr as json,
|
|
1128
|
+
Nr as jsonl,
|
|
1129
|
+
Or as link,
|
|
1130
|
+
Lr as mergeRoutePolicies,
|
|
1131
|
+
Mr as mergeRouteSecurityPolicies,
|
|
1132
|
+
Pr as mergeSecurityPolicies,
|
|
1133
|
+
Ur as meta,
|
|
1134
|
+
Fr as modulePreload,
|
|
1135
|
+
jr as notFound,
|
|
1136
|
+
Tt as page,
|
|
1137
|
+
x as parseBodySize,
|
|
1138
|
+
z as parseCacheDuration,
|
|
1139
|
+
Br as parseCookieHeader,
|
|
1140
|
+
qr as parseRateLimitWindow,
|
|
1141
|
+
qt as planImageTransform,
|
|
1142
|
+
Hr as preconnect,
|
|
1143
|
+
_r as preload,
|
|
1144
|
+
Vr as query,
|
|
1145
|
+
Wr as redirect,
|
|
1146
|
+
Wt as renderFontFaceCss,
|
|
1147
|
+
xt as renderOgImageResponse,
|
|
1148
|
+
ye as renderOgImageSvg,
|
|
1149
|
+
rr as renderPageResponse,
|
|
1150
|
+
$t as renderRobots,
|
|
1151
|
+
St as renderSitemap,
|
|
1152
|
+
Gr as resolveLinks,
|
|
1153
|
+
Kr as resolveMetadata,
|
|
1154
|
+
nr as resolveScripts,
|
|
1155
|
+
J as response,
|
|
1156
|
+
bt as runIdempotentMutation,
|
|
1157
|
+
Q as script,
|
|
1158
|
+
Yr as security,
|
|
1159
|
+
X as serializeCacheKey,
|
|
1160
|
+
Zr as serializeCacheNamespace,
|
|
1161
|
+
Qr as serializeCacheTag,
|
|
1162
|
+
Xr as serverTiming,
|
|
1163
|
+
Jr as sse,
|
|
1164
|
+
en as stream,
|
|
1165
|
+
tn as structuredData,
|
|
1166
|
+
rn as tag,
|
|
1167
|
+
nn as text,
|
|
1168
|
+
ee as toResponse,
|
|
1169
|
+
an as validateCorsPolicy,
|
|
1170
|
+
Nt as validateEnv,
|
|
1171
|
+
on as validateRateLimitPolicy,
|
|
1172
|
+
sn as validateRouteModules,
|
|
1173
|
+
Mt as validateUploads,
|
|
1174
|
+
zt as webhook
|
|
1317
1175
|
};
|
|
1318
1176
|
//# sourceMappingURL=index.js.map
|