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