@demiurgejs/core 0.2.0-beta.5 → 0.2.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +14 -0
  2. package/bin/demiurge.mjs +6 -0
  3. package/dist/browser/file-router.d.ts +1 -0
  4. package/dist/browser/file-router.d.ts.map +1 -1
  5. package/dist/chunks/{document-shell-9GPwtcTt.js → document-shell-C0aPrkhd.js} +2 -2
  6. package/dist/chunks/{document-shell-9GPwtcTt.js.map → document-shell-C0aPrkhd.js.map} +1 -1
  7. package/dist/chunks/image-CRerJ5BY.js +145 -0
  8. package/dist/chunks/image-CRerJ5BY.js.map +1 -0
  9. package/dist/chunks/{image-codec-Dh1POFhE.js → image-codec-CQ8Cwxwb.js} +2 -2
  10. package/dist/chunks/{image-codec-Dh1POFhE.js.map → image-codec-CQ8Cwxwb.js.map} +1 -1
  11. package/dist/chunks/{images-CG7ZzayG.js → images-QgdmLyQ3.js} +11 -11
  12. package/dist/chunks/{images-CG7ZzayG.js.map → images-QgdmLyQ3.js.map} +1 -1
  13. package/dist/chunks/{index-0MNiR_wo.js → index-LYve1rQp.js} +286 -351
  14. package/dist/chunks/index-LYve1rQp.js.map +1 -0
  15. package/dist/chunks/links-iU22QkCE.js +68 -0
  16. package/dist/chunks/links-iU22QkCE.js.map +1 -0
  17. package/dist/chunks/{plugin-BZauDxRY.js → plugin-bkP6WwrS.js} +13 -12
  18. package/dist/chunks/{plugin-BZauDxRY.js.map → plugin-bkP6WwrS.js.map} +1 -1
  19. package/dist/chunks/runtime-BH519j2t.js +294 -0
  20. package/dist/chunks/runtime-BH519j2t.js.map +1 -0
  21. package/dist/chunks/streaming-BlKlC3nw.js +427 -0
  22. package/dist/chunks/streaming-BlKlC3nw.js.map +1 -0
  23. package/dist/chunks/{testing-CUwGj2ie.js → testing-BEW1nchS.js} +645 -630
  24. package/dist/chunks/testing-BEW1nchS.js.map +1 -0
  25. package/dist/chunks/{vite-QoqrGl6f.js → vite-BADZA8Fl.js} +73 -70
  26. package/dist/chunks/vite-BADZA8Fl.js.map +1 -0
  27. package/dist/cli.d.ts +8 -2
  28. package/dist/cli.d.ts.map +1 -1
  29. package/dist/cli.js +186 -122
  30. package/dist/cli.js.map +1 -1
  31. package/dist/config/index.js +2 -2
  32. package/dist/config/types.d.ts +3 -1
  33. package/dist/config/types.d.ts.map +1 -1
  34. package/dist/config/validate.d.ts.map +1 -1
  35. package/dist/data/cache.d.ts +5 -0
  36. package/dist/data/cache.d.ts.map +1 -1
  37. package/dist/data/index.d.ts +1 -1
  38. package/dist/data/index.d.ts.map +1 -1
  39. package/dist/data/testing.d.ts.map +1 -1
  40. package/dist/data/testing.js +101 -67
  41. package/dist/data/testing.js.map +1 -1
  42. package/dist/data/tiered.d.ts.map +1 -1
  43. package/dist/edge/index.js +27 -26
  44. package/dist/edge/index.js.map +1 -1
  45. package/dist/edge/stores.d.ts.map +1 -1
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +910 -891
  49. package/dist/index.js.map +1 -1
  50. package/dist/internal/testing.js +2 -2
  51. package/dist/kv/index.js +7 -6
  52. package/dist/kv/index.js.map +1 -1
  53. package/dist/kv/store.d.ts.map +1 -1
  54. package/dist/node/http.d.ts +2 -0
  55. package/dist/node/http.d.ts.map +1 -1
  56. package/dist/node/index.d.ts +1 -1
  57. package/dist/node/index.d.ts.map +1 -1
  58. package/dist/node/index.js +12 -11
  59. package/dist/node/index.js.map +1 -1
  60. package/dist/node/serve.d.ts +4 -0
  61. package/dist/node/serve.d.ts.map +1 -1
  62. package/dist/redis/index.js +29 -28
  63. package/dist/redis/index.js.map +1 -1
  64. package/dist/redis/store.d.ts.map +1 -1
  65. package/dist/route/serialization.d.ts +4 -4
  66. package/dist/route/serialization.d.ts.map +1 -1
  67. package/dist/static/index.d.ts.map +1 -1
  68. package/dist/static/index.js +255 -255
  69. package/dist/static/index.js.map +1 -1
  70. package/dist/static/testing.d.ts +26 -0
  71. package/dist/static/testing.d.ts.map +1 -0
  72. package/dist/static/testing.js +76 -0
  73. package/dist/static/testing.js.map +1 -0
  74. package/dist/testing/index.d.ts +47 -0
  75. package/dist/testing/index.d.ts.map +1 -0
  76. package/dist/testing/index.js +99 -0
  77. package/dist/testing/index.js.map +1 -0
  78. package/dist/vercel/build.d.ts +31 -0
  79. package/dist/vercel/build.d.ts.map +1 -0
  80. package/dist/vercel/config.d.ts +15 -0
  81. package/dist/vercel/config.d.ts.map +1 -0
  82. package/dist/vercel/index.d.ts +7 -0
  83. package/dist/vercel/index.d.ts.map +1 -0
  84. package/dist/vercel/index.js +11 -0
  85. package/dist/vercel/index.js.map +1 -0
  86. package/dist/vercel/runtime.d.ts +29 -0
  87. package/dist/vercel/runtime.d.ts.map +1 -0
  88. package/dist/vite/index.js +1 -1
  89. package/package.json +13 -1
  90. package/dist/chunks/index-0MNiR_wo.js.map +0 -1
  91. package/dist/chunks/streaming-GYIsVTQH.js +0 -560
  92. package/dist/chunks/streaming-GYIsVTQH.js.map +0 -1
  93. package/dist/chunks/testing-CUwGj2ie.js.map +0 -1
  94. package/dist/chunks/vite-QoqrGl6f.js.map +0 -1
@@ -1,124 +1,124 @@
1
- import { renderToString as ee } from "react-dom/server";
2
- import { createContext as te, useContext as ne, useEffect as re, createElement as g } from "react";
3
- const F = "__demiurge_data", ie = "data-demiurge-hydrate", oe = "data-demiurge-fallback";
4
- function ce(e, t = {}) {
5
- return ae(
1
+ import { renderToString as X } from "react-dom/server";
2
+ import { createContext as Z, useContext as ee, useEffect as te, createElement as g } from "react";
3
+ const L = "__demiurge_data", re = "data-demiurge-hydrate", ne = "data-demiurge-fallback";
4
+ function ie(e, t = {}) {
5
+ return oe(
6
6
  JSON.stringify({ data: e, hasData: !0, ...t })
7
7
  );
8
8
  }
9
- function nt(e) {
10
- const t = e.getElementById(F), n = t?.tagName === "TEMPLATE" ? t.content.textContent : t?.textContent;
11
- if (n)
9
+ function Xe(e) {
10
+ const t = e.getElementById(L), r = t?.tagName === "TEMPLATE" ? t.content.textContent : t?.textContent;
11
+ if (r)
12
12
  try {
13
- return JSON.parse(n);
14
- } catch (r) {
13
+ return JSON.parse(r);
14
+ } catch (n) {
15
15
  throw new Error(
16
16
  "Demiurge could not parse the initial route data payload.",
17
- { cause: r }
17
+ { cause: n }
18
18
  );
19
19
  }
20
20
  }
21
- function ae(e) {
21
+ function oe(e) {
22
22
  return e.replace(/&/g, "\\u0026").replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
23
23
  }
24
- const T = "demiurge", N = /* @__PURE__ */ new WeakMap();
24
+ const k = "demiurge", N = /* @__PURE__ */ new WeakMap();
25
25
  function C(e, t) {
26
- return se(e)?.createScriptURL(t) ?? t;
26
+ return ce(e)?.createScriptURL(t) ?? t;
27
27
  }
28
- function se(e) {
28
+ function ce(e) {
29
29
  if (!e)
30
30
  return null;
31
31
  const t = N.get(e);
32
32
  if (t !== void 0)
33
33
  return t;
34
- const n = ue(e);
35
- return N.set(e, n), n;
34
+ const r = ae(e);
35
+ return N.set(e, r), r;
36
36
  }
37
- function ue(e) {
37
+ function ae(e) {
38
38
  const t = e.trustedTypes;
39
39
  if (!t || typeof t.createPolicy != "function")
40
40
  return null;
41
41
  try {
42
- return t.createPolicy(T, {
42
+ return t.createPolicy(k, {
43
43
  // The framework passes only a URL that the server rendered into its own
44
44
  // placeholder attribute. `script-src` and `worker-src` still govern that
45
45
  // URL, so this policy adds a type without widening the source rules.
46
- createScriptURL: (n) => n
46
+ createScriptURL: (r) => r
47
47
  });
48
- } catch (n) {
48
+ } catch (r) {
49
49
  return console.error(
50
- `Demiurge could not create the ${JSON.stringify(T)} Trusted Types policy. Add ${JSON.stringify(T)} to the document trusted-types directive.`,
51
- n
50
+ `Demiurge could not create the ${JSON.stringify(k)} Trusted Types policy. Add ${JSON.stringify(k)} to the document trusted-types directive.`,
51
+ r
52
52
  ), null;
53
53
  }
54
54
  }
55
- const E = "text/demiurge-script", f = "data-demiurge-script", p = "data-demiurge-script-src", A = "data-demiurge-script-type", P = "data-demiurge-script-started", de = 2e3, le = [
55
+ const v = "text/demiurge-script", f = "data-demiurge-script", p = "data-demiurge-script-src", A = "data-demiurge-script-type", P = "data-demiurge-script-started", se = 2e3, ue = [
56
56
  "data-api",
57
57
  "data-demiurge-script-placement",
58
58
  "data-domain",
59
59
  "id",
60
60
  "integrity",
61
61
  "referrerpolicy"
62
- ], j = /* @__PURE__ */ new Map();
62
+ ], F = /* @__PURE__ */ new Map();
63
63
  function S(e) {
64
64
  return e === "idle" || e === "worker";
65
65
  }
66
- function J(e) {
66
+ function G(e) {
67
67
  const t = e ?? (typeof document > "u" ? void 0 : document);
68
68
  if (!t)
69
69
  return;
70
- const n = t.querySelectorAll(
70
+ const r = t.querySelectorAll(
71
71
  `script[${f}]:not([${P}])`
72
72
  );
73
- for (const r of [...n]) {
74
- const i = r.getAttribute(f);
73
+ for (const n of [...r]) {
74
+ const i = n.getAttribute(f);
75
75
  if (!(i !== "idle" && i !== "worker")) {
76
- if (r.setAttribute(P, ""), i === "worker") {
77
- ye(r);
76
+ if (n.setAttribute(P, ""), i === "worker") {
77
+ fe(n);
78
78
  continue;
79
79
  }
80
- fe(r, () => pe(r));
80
+ de(n, () => le(n));
81
81
  }
82
82
  }
83
83
  }
84
- function rt(e) {
85
- return j.get(e);
84
+ function Ze(e) {
85
+ return F.get(e);
86
86
  }
87
- function fe(e, t) {
88
- const n = e.ownerDocument.defaultView;
89
- if (n && typeof n.requestIdleCallback == "function") {
90
- n.requestIdleCallback(() => t(), { timeout: de });
87
+ function de(e, t) {
88
+ const r = e.ownerDocument.defaultView;
89
+ if (r && typeof r.requestIdleCallback == "function") {
90
+ r.requestIdleCallback(() => t(), { timeout: se });
91
91
  return;
92
92
  }
93
- (n ?? globalThis).setTimeout(t, 1);
93
+ (r ?? globalThis).setTimeout(t, 1);
94
94
  }
95
- function pe(e) {
96
- const t = e.ownerDocument, n = e.getAttribute(p);
97
- if (!n)
95
+ function le(e) {
96
+ const t = e.ownerDocument, r = e.getAttribute(p);
97
+ if (!r)
98
98
  return;
99
- const r = t.createElement("script"), i = e.getAttribute(A);
100
- for (const a of le) {
99
+ const n = t.createElement("script"), i = e.getAttribute(A);
100
+ for (const a of ue) {
101
101
  const c = e.getAttribute(a);
102
- c !== null && r.setAttribute(a, c);
102
+ c !== null && n.setAttribute(a, c);
103
103
  }
104
- e.removeAttribute("id"), i && (r.type = i), r.async = !0, r.nonce = e.nonce, r.src = C(t.defaultView, n), t.head.appendChild(r);
104
+ e.removeAttribute("id"), i && (n.type = i), n.async = !0, n.nonce = e.nonce, n.src = C(t.defaultView, r), t.head.appendChild(n);
105
105
  }
106
- function ye(e) {
107
- const t = e.getAttribute(p), n = e.ownerDocument.defaultView;
106
+ function fe(e) {
107
+ const t = e.getAttribute(p), r = e.ownerDocument.defaultView;
108
108
  if (!t)
109
109
  return;
110
- if (!n || typeof n.Worker != "function") {
110
+ if (!r || typeof r.Worker != "function") {
111
111
  console.error(
112
112
  `Demiurge could not start the worker script ${JSON.stringify(t)}. This runtime has no Worker constructor.`
113
113
  );
114
114
  return;
115
115
  }
116
- const r = e.getAttribute(A);
116
+ const n = e.getAttribute(A);
117
117
  try {
118
- j.set(
118
+ F.set(
119
119
  t,
120
- new n.Worker(C(n, t), {
121
- type: r === "module" ? "module" : "classic"
120
+ new r.Worker(C(r, t), {
121
+ type: n === "module" ? "module" : "classic"
122
122
  })
123
123
  );
124
124
  } catch (i) {
@@ -128,95 +128,35 @@ function ye(e) {
128
128
  );
129
129
  }
130
130
  }
131
- function it(e) {
132
- return e;
133
- }
134
- function ot(e, t = {}) {
135
- return {
136
- ...t,
137
- href: e,
138
- kind: "link",
139
- rel: "preconnect"
140
- };
141
- }
142
- function ct(e, t) {
143
- return {
144
- ...t,
145
- href: e,
146
- kind: "link",
147
- rel: "preload"
148
- };
149
- }
150
- function at(e) {
151
- return {
152
- href: e,
153
- kind: "link",
154
- rel: "modulepreload"
155
- };
156
- }
157
- async function st(e, t) {
158
- const n = [];
159
- for (const r of e) {
160
- if (!r)
161
- continue;
162
- const i = typeof r == "function" ? await r(t) : r;
163
- n.push(...i);
164
- }
165
- return me(n).sort(ge);
166
- }
167
- function me(e) {
168
- const t = /* @__PURE__ */ new Map();
169
- for (const n of e)
170
- t.set(U(n), {
171
- ...t.get(U(n)),
172
- ...n
173
- });
174
- return [...t.values()];
175
- }
176
- function U(e) {
177
- return [
178
- e.rel,
179
- e.href,
180
- e.as ?? "",
181
- e.type ?? "",
182
- e.crossOrigin ?? ""
183
- ].join("\0");
184
- }
185
- function ge(e, t) {
186
- return M(e.rel) - M(t.rel) || e.href.localeCompare(t.href);
187
- }
188
- function M(e) {
189
- return e === "preconnect" ? 0 : e === "preload" ? 1 : e === "modulepreload" ? 2 : 3;
190
- }
191
- const l = "data-demiurge-document-contribution", b = "data-demiurge-script-strategy", m = "data-demiurge-navigation-status", Y = "__demiurge_navigation_status", V = "data-demiurge-navigation-status-style", he = "demiurge-navigation-status", Ae = ".demiurge-navigation-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}";
192
- function ut(e) {
131
+ const l = "data-demiurge-document-contribution", b = "data-demiurge-script-strategy", m = "data-demiurge-navigation-status", j = "__demiurge_navigation_status", J = "data-demiurge-navigation-status-style", pe = "demiurge-navigation-status", ye = ".demiurge-navigation-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}";
132
+ function et(e) {
193
133
  const t = typeof document > "u" ? void 0 : document;
194
134
  if (!t || t.querySelector(`[${m}]`))
195
135
  return t?.querySelector(`[${m}]`);
196
- const n = t.createElement("style");
197
- n.setAttribute(V, ""), n.textContent = Ae;
198
- const r = [...t.scripts].reverse().find((a) => a.nonce)?.nonce;
199
- r && (n.nonce = r), t.head.append(n);
136
+ const r = t.createElement("style");
137
+ r.setAttribute(J, ""), r.textContent = ye;
138
+ const n = [...t.scripts].reverse().find((a) => a.nonce)?.nonce;
139
+ n && (r.nonce = n), t.head.append(r);
200
140
  const i = t.createElement("div");
201
- return i.id = Y, i.setAttribute(m, ""), i.className = he, i.setAttribute("role", "status"), i.setAttribute("aria-live", "polite"), i.setAttribute("aria-atomic", "true"), t.body.prepend(i), i;
141
+ return i.id = j, i.setAttribute(m, ""), i.className = pe, i.setAttribute("role", "status"), i.setAttribute("aria-live", "polite"), i.setAttribute("aria-atomic", "true"), t.body.prepend(i), i;
202
142
  }
203
- function dt(e, t) {
204
- const r = (typeof document > "u" ? void 0 : document)?.querySelector(
143
+ function tt(e, t) {
144
+ const n = (typeof document > "u" ? void 0 : document)?.querySelector(
205
145
  `[${m}]`
206
146
  );
207
- r && (r.textContent = e);
147
+ n && (n.textContent = e);
208
148
  }
209
- function lt(e) {
149
+ function rt(e) {
210
150
  return {
211
151
  dir: e.dir,
212
152
  lang: e.lang,
213
153
  links: [...e.links ?? []],
214
154
  metadata: e.metadata,
215
- scripts: (e.scripts ?? []).map(Se),
155
+ scripts: (e.scripts ?? []).map(me),
216
156
  title: e.metadata.title ?? e.title ?? "Demiurge App"
217
157
  };
218
158
  }
219
- function Se(e) {
159
+ function me(e) {
220
160
  return {
221
161
  async: e.async,
222
162
  crossOrigin: e.crossOrigin,
@@ -232,108 +172,108 @@ function Se(e) {
232
172
  type: e.type
233
173
  };
234
174
  }
235
- function ft(e, t) {
236
- const n = typeof document > "u" ? void 0 : document;
237
- if (n) {
238
- n.title = e.title, e.lang && (n.documentElement.lang = e.lang), e.dir && (n.documentElement.dir = e.dir), ve(n, e.scripts);
239
- for (const r of n.head.querySelectorAll(
175
+ function nt(e, t) {
176
+ const r = typeof document > "u" ? void 0 : document;
177
+ if (r) {
178
+ r.title = e.title, e.lang && (r.documentElement.lang = e.lang), e.dir && (r.documentElement.dir = e.dir), he(r, e.scripts);
179
+ for (const n of r.head.querySelectorAll(
240
180
  `[${l}]:not(script)`
241
181
  ))
242
- r.remove();
243
- $e(n, e.metadata);
244
- for (const r of e.links)
245
- n.head.append(_(n, r));
246
- J(n);
182
+ n.remove();
183
+ ge(r, e.metadata);
184
+ for (const n of e.links)
185
+ r.head.append(_(r, n));
186
+ G(r);
247
187
  }
248
188
  }
249
- function $e(e, t) {
250
- t.description && e.head.append(v(e, {
189
+ function ge(e, t) {
190
+ t.description && e.head.append(E(e, {
251
191
  content: t.description,
252
192
  name: "description"
253
193
  })), t.canonical && e.head.append(_(e, {
254
194
  href: t.canonical,
255
195
  rel: "canonical"
256
- })), t.robots && e.head.append(v(e, {
196
+ })), t.robots && e.head.append(E(e, {
257
197
  content: [
258
198
  t.robots.index === !1 ? "noindex" : "index",
259
199
  t.robots.follow === !1 ? "nofollow" : "follow"
260
200
  ].join(", "),
261
201
  name: "robots"
262
202
  }));
263
- const n = t.openGraph;
264
- for (const [r, i] of [
265
- ["og:title", n?.title],
266
- ["og:description", n?.description],
267
- ["og:image", n?.image]
203
+ const r = t.openGraph;
204
+ for (const [n, i] of [
205
+ ["og:title", r?.title],
206
+ ["og:description", r?.description],
207
+ ["og:image", r?.image]
268
208
  ])
269
- i && e.head.append(v(e, { content: i, property: r }));
270
- for (const r of t.custom)
209
+ i && e.head.append(E(e, { content: i, property: n }));
210
+ for (const n of t.custom)
271
211
  e.head.append(
272
- r.kind === "link" ? _(e, r) : v(e, r)
212
+ n.kind === "link" ? _(e, n) : E(e, n)
273
213
  );
274
- for (const r of t.structuredData) {
214
+ for (const n of t.structuredData) {
275
215
  const i = e.createElement("script");
276
- i.type = "application/ld+json", i.textContent = JSON.stringify(r.value), w(i), W(i, e), e.head.append(i);
216
+ i.type = "application/ld+json", i.textContent = JSON.stringify(n.value), w(i), Y(i, e), e.head.append(i);
277
217
  }
278
218
  }
279
- function v(e, t) {
280
- const n = e.createElement("meta");
281
- return n.content = t.content, t.name && (n.name = t.name), t.property && n.setAttribute("property", t.property), w(n), n;
219
+ function E(e, t) {
220
+ const r = e.createElement("meta");
221
+ return r.content = t.content, t.name && (r.name = t.name), t.property && r.setAttribute("property", t.property), w(r), r;
282
222
  }
283
223
  function _(e, t) {
284
- const n = e.createElement("link");
285
- return n.rel = t.rel, n.href = t.href, t.as && (n.as = t.as), t.type && (n.type = t.type), t.crossOrigin && (n.crossOrigin = t.crossOrigin), t.hrefLang && (n.hreflang = t.hrefLang), w(n), n;
224
+ const r = e.createElement("link");
225
+ return r.rel = t.rel, r.href = t.href, t.as && (r.as = t.as), t.type && (r.type = t.type), t.crossOrigin && (r.crossOrigin = t.crossOrigin), t.hrefLang && (r.hreflang = t.hrefLang), w(r), r;
286
226
  }
287
- function ve(e, t) {
288
- const n = /* @__PURE__ */ new Map();
289
- for (const r of e.querySelectorAll(
227
+ function he(e, t) {
228
+ const r = /* @__PURE__ */ new Map();
229
+ for (const n of e.querySelectorAll(
290
230
  `script[${l}]`
291
231
  ))
292
- n.set(be(r), r);
293
- for (const r of t) {
294
- const i = we(r);
295
- n.delete(i) || e.head.append(Ee(e, r));
232
+ r.set(Se(n), n);
233
+ for (const n of t) {
234
+ const i = $e(n);
235
+ r.delete(i) || e.head.append(Ae(e, n));
296
236
  }
297
- for (const r of n.values())
298
- r.remove();
237
+ for (const n of r.values())
238
+ n.remove();
299
239
  }
300
- function Ee(e, t) {
301
- const n = e.createElement("script");
302
- return w(n), n.setAttribute(b, t.strategy), W(n, e), t.id && (n.id = t.id), t.integrity && (n.integrity = t.integrity), t.crossOrigin && (n.crossOrigin = t.crossOrigin), t.referrerPolicy && (n.referrerPolicy = t.referrerPolicy), t.dataApi && (n.dataset.api = t.dataApi), t.dataDomain && (n.dataset.domain = t.dataDomain), S(t.strategy) ? (n.type = E, n.setAttribute(f, t.strategy), n.setAttribute(p, t.src), t.type && n.setAttribute(A, t.type), n) : (n.async = t.async ?? !1, n.defer = t.defer ?? !1, n.type = t.type ?? H(t.strategy), n.src = C(e.defaultView, t.src), n);
240
+ function Ae(e, t) {
241
+ const r = e.createElement("script");
242
+ return w(r), r.setAttribute(b, t.strategy), Y(r, e), t.id && (r.id = t.id), t.integrity && (r.integrity = t.integrity), t.crossOrigin && (r.crossOrigin = t.crossOrigin), t.referrerPolicy && (r.referrerPolicy = t.referrerPolicy), t.dataApi && (r.dataset.api = t.dataApi), t.dataDomain && (r.dataset.domain = t.dataDomain), S(t.strategy) ? (r.type = v, r.setAttribute(f, t.strategy), r.setAttribute(p, t.src), t.type && r.setAttribute(A, t.type), r) : (r.async = t.async ?? !1, r.defer = t.defer ?? !1, r.type = t.type ?? V(t.strategy), r.src = C(e.defaultView, t.src), r);
303
243
  }
304
- function W(e, t) {
305
- const n = [...t.scripts].reverse().find((r) => r.nonce)?.nonce;
306
- n && (e.nonce = n);
244
+ function Y(e, t) {
245
+ const r = [...t.scripts].reverse().find((n) => n.nonce)?.nonce;
246
+ r && (e.nonce = r);
307
247
  }
308
248
  function w(e) {
309
249
  e.setAttribute(l, "");
310
250
  }
311
- function be(e) {
312
- const t = e.getAttribute(b) ?? e.getAttribute(f) ?? Re(e);
251
+ function Se(e) {
252
+ const t = e.getAttribute(b) ?? e.getAttribute(f) ?? Ee(e);
313
253
  return [e.getAttribute(p) ?? e.getAttribute("src") ?? "", e.getAttribute("type") ?? "", e.integrity, t].join("\0");
314
254
  }
315
- function we(e) {
316
- const t = S(e.strategy) ? E : e.type ?? H(e.strategy);
255
+ function $e(e) {
256
+ const t = S(e.strategy) ? v : e.type ?? V(e.strategy);
317
257
  return [e.src, t, e.integrity ?? "", e.strategy].join("\0");
318
258
  }
319
- function Re(e) {
259
+ function Ee(e) {
320
260
  return e.type === "module" ? "module" : "afterInteractive";
321
261
  }
322
- function H(e) {
262
+ function V(e) {
323
263
  return e === "module" ? "module" : "";
324
264
  }
325
- const ke = /* @__PURE__ */ new Set([
265
+ const ve = /* @__PURE__ */ new Set([
326
266
  "afterInteractive",
327
267
  "beforeInteractive",
328
268
  "idle",
329
269
  "module",
330
270
  "worker"
331
- ]), u = Symbol("demiurge.scriptPlacement"), K = te(
271
+ ]), u = Symbol("demiurge.scriptPlacement"), W = Z(
332
272
  void 0
333
273
  );
334
- function De(e = {}) {
274
+ function be(e = {}) {
335
275
  let t = !1;
336
- const n = [...e.scripts ?? []], r = new Set(n.map((c) => c.src)), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
276
+ const r = [...e.scripts ?? []], n = new Set(r.map((c) => c.src)), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
337
277
  return {
338
278
  get dev() {
339
279
  return e.dev ?? !1;
@@ -346,7 +286,7 @@ function De(e = {}) {
346
286
  },
347
287
  nonce: e.nonce,
348
288
  register(c) {
349
- if (r.has(c.src) || i.has(c.src))
289
+ if (n.has(c.src) || i.has(c.src))
350
290
  return "skip";
351
291
  if (i.add(c.src), !t)
352
292
  return a.set(c.src, {
@@ -360,30 +300,30 @@ function De(e = {}) {
360
300
  return "render";
361
301
  },
362
302
  scripts() {
363
- return z([...n, ...a.values()]);
303
+ return H([...r, ...a.values()]);
364
304
  }
365
305
  };
366
306
  }
367
- function pt(e) {
368
- const t = ne(K), n = _e(e);
369
- if (re(() => {
370
- S(n.strategy) && J();
307
+ function it(e) {
308
+ const t = ee(W), r = De(e);
309
+ if (te(() => {
310
+ S(r.strategy) && G();
371
311
  }), !t) {
372
312
  if (typeof document > "u")
373
313
  throw new Error(
374
- `The script ${JSON.stringify(n.src)} rendered outside a Demiurge document render context. A server render must wrap its component tree with the script render context.`
314
+ `The script ${JSON.stringify(r.src)} rendered outside a Demiurge document render context. A server render must wrap its component tree with the script render context.`
375
315
  );
376
- return Ie(n.src) ? null : L({
377
- ...n,
316
+ return we(r.src) ? null : U({
317
+ ...r,
378
318
  [u]: "in-place"
379
- }, Te());
319
+ }, Re());
380
320
  }
381
- return t.register(n) !== "render" ? null : L({
382
- ...n,
321
+ return t.register(r) !== "render" ? null : U({
322
+ ...r,
383
323
  [u]: "in-place"
384
324
  }, t.nonce);
385
325
  }
386
- function L(e, t) {
326
+ function U(e, t) {
387
327
  return S(e.strategy) ? g("script", {
388
328
  "data-api": e.dataApi,
389
329
  [f]: e.strategy,
@@ -395,7 +335,7 @@ function L(e, t) {
395
335
  integrity: e.integrity,
396
336
  nonce: e.nonce ?? t,
397
337
  referrerPolicy: e.referrerPolicy,
398
- type: E
338
+ type: v
399
339
  }) : g("script", {
400
340
  async: e.async,
401
341
  crossOrigin: e.crossOrigin,
@@ -408,27 +348,27 @@ function L(e, t) {
408
348
  nonce: e.nonce ?? t,
409
349
  referrerPolicy: e.referrerPolicy,
410
350
  src: e.src,
411
- type: e.type ?? Ne(e.strategy)
351
+ type: e.type ?? _e(e.strategy)
412
352
  });
413
353
  }
414
- function Ie(e) {
354
+ function we(e) {
415
355
  if (typeof document > "u")
416
356
  return !1;
417
357
  const t = new URL(e, document.baseURI).href;
418
358
  return [...document.scripts].some(
419
- (n) => n.src === t && n.dataset.demiurgeScriptPlacement !== "in-place"
359
+ (r) => r.src === t && r.dataset.demiurgeScriptPlacement !== "in-place"
420
360
  );
421
361
  }
422
- function Te() {
362
+ function Re() {
423
363
  if (!(typeof document > "u"))
424
364
  return [...document.scripts].reverse().find((e) => e.nonce)?.nonce;
425
365
  }
426
- function yt(e) {
366
+ function ot(e) {
427
367
  return e;
428
368
  }
429
- function _e(e) {
369
+ function De(e) {
430
370
  const t = e.strategy ?? "afterInteractive";
431
- if (!ke.has(t))
371
+ if (!ve.has(t))
432
372
  throw new Error(
433
373
  `Unsupported script strategy ${JSON.stringify(t)}. Demiurge supports "beforeInteractive", "module", "afterInteractive", "idle", and "worker".`
434
374
  );
@@ -446,29 +386,29 @@ function _e(e) {
446
386
  strategy: t
447
387
  };
448
388
  }
449
- function Oe(e, t) {
450
- return g(K.Provider, { value: e, children: t });
389
+ function Ie(e, t) {
390
+ return g(W.Provider, { value: e, children: t });
451
391
  }
452
- async function mt(e, t) {
453
- const n = [];
454
- for (const r of e) {
455
- if (!r)
392
+ async function ct(e, t) {
393
+ const r = [];
394
+ for (const n of e) {
395
+ if (!n)
456
396
  continue;
457
- const i = typeof r == "function" ? await r(t) : r;
458
- n.push(...i);
397
+ const i = typeof n == "function" ? await n(t) : n;
398
+ r.push(...i);
459
399
  }
460
- return z(Ce(n));
400
+ return H(Te(r));
461
401
  }
462
- function Ce(e) {
402
+ function Te(e) {
463
403
  const t = /* @__PURE__ */ new Map();
464
- for (const n of e)
465
- t.set(B(n), {
466
- ...t.get(B(n)),
467
- ...n
404
+ for (const r of e)
405
+ t.set(M(r), {
406
+ ...t.get(M(r)),
407
+ ...r
468
408
  });
469
409
  return [...t.values()];
470
410
  }
471
- function B(e) {
411
+ function M(e) {
472
412
  return [
473
413
  e.src,
474
414
  e.type ?? "",
@@ -476,53 +416,53 @@ function B(e) {
476
416
  e.strategy
477
417
  ].join("\0");
478
418
  }
479
- function xe(e, t) {
480
- return q(e.strategy) - q(t.strategy) || e.src.localeCompare(t.src);
419
+ function ke(e, t) {
420
+ return B(e.strategy) - B(t.strategy) || e.src.localeCompare(t.src);
481
421
  }
482
- function z(e) {
483
- return e.sort(xe);
422
+ function H(e) {
423
+ return e.sort(ke);
484
424
  }
485
- function Ne(e) {
425
+ function _e(e) {
486
426
  return e === "module" ? "module" : void 0;
487
427
  }
488
- function q(e) {
428
+ function B(e) {
489
429
  return e === "beforeInteractive" ? 0 : e === "module" ? 1 : e === "afterInteractive" ? 2 : e === "idle" ? 3 : 4;
490
430
  }
491
- const Pe = "data-demiurge-structured-data";
492
- function Ue(e) {
431
+ const Oe = "data-demiurge-structured-data";
432
+ function Ce(e) {
493
433
  if (e.body) {
494
- const { html: t, ...n } = e.body, { prefix: r, suffix: i } = Me({ ...e, body: n });
495
- return `${r}${t}${i}`;
434
+ const { html: t, ...r } = e.body, { prefix: n, suffix: i } = xe({ ...e, body: r });
435
+ return `${n}${t}${i}`;
496
436
  }
497
- return Le(e);
437
+ return Ne(e);
498
438
  }
499
- function Me({
439
+ function xe({
500
440
  body: e,
501
441
  dir: t,
502
- entrySrc: n,
503
- lang: r = "en",
442
+ entrySrc: r,
443
+ lang: n = "en",
504
444
  links: i = [],
505
445
  metadata: a,
506
446
  nonce: c,
507
447
  scripts: $ = [],
508
448
  styles: R = [],
509
- title: k = "Demiurge App"
449
+ title: D = "Demiurge App"
510
450
  }) {
511
- const D = a?.title ?? k, y = [
512
- ...$.filter((I) => I[u] !== "hoisted").map((I) => ` ${x(I, c)}`),
513
- Ge(e.data, e.navigation, e.locale),
514
- ...n ? [X(n, c)] : []
451
+ const I = a?.title ?? D, y = [
452
+ ...$.filter((T) => T[u] !== "hoisted").map((T) => ` ${x(T, c)}`),
453
+ Me(e.data, e.navigation, e.locale),
454
+ ...r ? [z(r, c)] : []
515
455
  ].join(`
516
456
  `);
517
457
  return {
518
458
  prefix: `<!doctype html>
519
- <html lang="${s(r)}"${o("dir", t)}>
459
+ <html lang="${s(n)}"${o("dir", t)}>
520
460
  <head>
521
- ${Z({ links: i, metadata: a, nonce: c, scripts: $, styles: R, title: D })}
461
+ ${Q({ links: i, metadata: a, nonce: c, scripts: $, styles: R, title: I })}
522
462
  </head>
523
463
  <body>
524
- ${e.navigation === "document" ? "" : Q(c)}
525
- ${qe(e)}`,
464
+ ${e.navigation === "document" ? "" : K(c)}
465
+ ${Ue(e)}`,
526
466
  suffix: `</div>
527
467
  ${y}
528
468
  </body>
@@ -530,57 +470,57 @@ ${y}
530
470
  `
531
471
  };
532
472
  }
533
- function Le({
473
+ function Ne({
534
474
  dir: e,
535
475
  entrySrc: t,
536
- lang: n = "en",
537
- links: r = [],
476
+ lang: r = "en",
477
+ links: n = [],
538
478
  metadata: i,
539
479
  nonce: a,
540
480
  scripts: c = [],
541
481
  styles: $ = [],
542
482
  title: R = "Demiurge App"
543
483
  }) {
544
- const k = i?.title ?? R, D = [
545
- Q(a),
546
- Be(),
484
+ const D = i?.title ?? R, I = [
485
+ K(a),
486
+ Pe(),
547
487
  ...c.filter((y) => y[u] !== "hoisted").map((y) => ` ${x(y, a)}`),
548
- ...t ? [X(t, a)] : []
488
+ ...t ? [z(t, a)] : []
549
489
  ].join(`
550
490
  `);
551
491
  return `<!doctype html>
552
- <html lang="${s(n)}"${o("dir", e)}>
492
+ <html lang="${s(r)}"${o("dir", e)}>
553
493
  <head>
554
- ${Z({ links: r, metadata: i, nonce: a, scripts: c, styles: $, title: k })}
494
+ ${Q({ links: n, metadata: i, nonce: a, scripts: c, styles: $, title: D })}
555
495
  </head>
556
496
  <body>
557
- ${D}
497
+ ${I}
558
498
  </body>
559
499
  </html>
560
500
  `;
561
501
  }
562
- function Q(e) {
563
- return " <style " + V + o("nonce", e) + `>.demiurge-navigation-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}</style>
564
- <div id="` + Y + '" ' + m + ' class="demiurge-navigation-status" role="status" aria-live="polite" aria-atomic="true"></div>';
502
+ function K(e) {
503
+ return " <style " + J + o("nonce", e) + `>.demiurge-navigation-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}</style>
504
+ <div id="` + j + '" ' + m + ' class="demiurge-navigation-status" role="status" aria-live="polite" aria-atomic="true"></div>';
565
505
  }
566
- function Be(e) {
506
+ function Pe(e) {
567
507
  return ' <div id="root"></div>';
568
508
  }
569
- function qe(e) {
570
- const t = e.fallback ? ` ${oe}="${s(e.fallback)}"` : "";
571
- return ` <div id="root" ${ie}=""${t}>`;
509
+ function Ue(e) {
510
+ const t = e.fallback ? ` ${ne}="${s(e.fallback)}"` : "";
511
+ return ` <div id="root" ${re}=""${t}>`;
572
512
  }
573
- function Ge(e, t, n) {
574
- return ` <template id="${F}">${ce(e, { locale: n, navigation: t })}</template>`;
513
+ function Me(e, t, r) {
514
+ return ` <template id="${L}">${ie(e, { locale: r, navigation: t })}</template>`;
575
515
  }
576
- function X(e, t) {
516
+ function z(e, t) {
577
517
  return ` <script type="module" src="${s(e)}"${o("nonce", t)}><\/script>`;
578
518
  }
579
- function Z({
519
+ function Q({
580
520
  links: e,
581
521
  metadata: t,
582
- nonce: n,
583
- scripts: r,
522
+ nonce: r,
523
+ scripts: n,
584
524
  styles: i,
585
525
  title: a
586
526
  }) {
@@ -606,21 +546,21 @@ function Z({
606
546
  rel: "canonical"
607
547
  }, !0)
608
548
  ] : [],
609
- ...Fe(t),
610
- ...je(t),
611
- ...(t?.custom ?? []).map(Je),
549
+ ...Be(t),
550
+ ...qe(t),
551
+ ...(t?.custom ?? []).map(Le),
612
552
  ...(t?.structuredData ?? []).map(
613
- (c) => Ye(c, n)
553
+ (c) => Fe(c, r)
614
554
  ),
615
555
  ...i.map(
616
556
  (c) => ` <link rel="stylesheet" href="${s(c)}" />`
617
557
  ),
618
558
  ...e.map((c) => O(c, !0)),
619
- ...r.filter((c) => c[u] === "hoisted").map((c) => ` ${x(c, n)}`)
559
+ ...n.filter((c) => c[u] === "hoisted").map((c) => ` ${x(c, r)}`)
620
560
  ].join(`
621
561
  `);
622
562
  }
623
- function Fe(e) {
563
+ function Be(e) {
624
564
  if (!e?.robots)
625
565
  return [];
626
566
  const t = [
@@ -634,7 +574,7 @@ function Fe(e) {
634
574
  }, !0)
635
575
  ];
636
576
  }
637
- function je(e) {
577
+ function qe(e) {
638
578
  return e?.openGraph ? [
639
579
  e.openGraph.title ? d({
640
580
  content: e.openGraph.title,
@@ -650,73 +590,73 @@ function je(e) {
650
590
  }, !0) : null
651
591
  ].filter((t) => !!t) : [];
652
592
  }
653
- function Je(e) {
593
+ function Le(e) {
654
594
  return e.kind === "link" ? O(e, !0) : d(e, !0);
655
595
  }
656
- function Ye(e, t) {
657
- return ` <script type="application/ld+json"${` ${l}` + (t ? "" : ` ${Pe}`)}${o("nonce", t)}>${He(JSON.stringify(e.value))}<\/script>`;
596
+ function Fe(e, t) {
597
+ return ` <script type="application/ld+json"${` ${l}` + (t ? "" : ` ${Oe}`)}${o("nonce", t)}>${Je(JSON.stringify(e.value))}<\/script>`;
658
598
  }
659
599
  function d(e, t = !1) {
660
- const n = t ? ` ${l}` : "";
600
+ const r = t ? ` ${l}` : "";
661
601
  if (e.name === "charset")
662
- return ` <meta${n} charset="${s(e.content)}" />`;
663
- const r = e.name ? ` name="${s(e.name)}"` : "", i = e.property ? ` property="${s(e.property)}"` : "";
664
- return ` <meta${n}${r}${i} content="${s(e.content)}" />`;
602
+ return ` <meta${r} charset="${s(e.content)}" />`;
603
+ const n = e.name ? ` name="${s(e.name)}"` : "", i = e.property ? ` property="${s(e.property)}"` : "";
604
+ return ` <meta${r}${n}${i} content="${s(e.content)}" />`;
665
605
  }
666
606
  function O(e, t = !1) {
667
607
  return ` <link${t ? ` ${l}` : ""}${o("rel", e.rel)}${o("href", e.href)}${o("as", e.as)}${o("type", e.type)}${o("crossorigin", e.crossOrigin)}${o("hreflang", e.hrefLang)} />`;
668
608
  }
669
609
  function x(e, t) {
670
- return S(e.strategy) ? Ve(e, t) : `<script ${l}${o(b, e.strategy)}${o("id", e.id)}${o("src", e.src)}${o("type", e.type ?? We(e.strategy))}${o("nonce", e.nonce ?? t)}${o("integrity", e.integrity)}${o("crossorigin", e.crossOrigin)}${o("referrerpolicy", e.referrerPolicy)}${o("data-api", e.dataApi)}${o("data-domain", e.dataDomain)}${o("data-demiurge-script-placement", e[u])}${G("async", e.async)}${G("defer", e.defer)}><\/script>`;
610
+ return S(e.strategy) ? Ge(e, t) : `<script ${l}${o(b, e.strategy)}${o("id", e.id)}${o("src", e.src)}${o("type", e.type ?? je(e.strategy))}${o("nonce", e.nonce ?? t)}${o("integrity", e.integrity)}${o("crossorigin", e.crossOrigin)}${o("referrerpolicy", e.referrerPolicy)}${o("data-api", e.dataApi)}${o("data-domain", e.dataDomain)}${o("data-demiurge-script-placement", e[u])}${q("async", e.async)}${q("defer", e.defer)}><\/script>`;
671
611
  }
672
- function Ve(e, t) {
673
- return `<script ${l}${o(b, e.strategy)}${o("id", e.id)}${o("type", E)}${o("nonce", e.nonce ?? t)}${o("integrity", e.integrity)}${o("crossorigin", e.crossOrigin)}${o("referrerpolicy", e.referrerPolicy)}${o("data-api", e.dataApi)}${o("data-domain", e.dataDomain)}${o(f, e.strategy)}${o(p, e.src)}${o(A, e.type)}${o("data-demiurge-script-placement", e[u])}><\/script>`;
612
+ function Ge(e, t) {
613
+ return `<script ${l}${o(b, e.strategy)}${o("id", e.id)}${o("type", v)}${o("nonce", e.nonce ?? t)}${o("integrity", e.integrity)}${o("crossorigin", e.crossOrigin)}${o("referrerpolicy", e.referrerPolicy)}${o("data-api", e.dataApi)}${o("data-domain", e.dataDomain)}${o(f, e.strategy)}${o(p, e.src)}${o(A, e.type)}${o("data-demiurge-script-placement", e[u])}><\/script>`;
674
614
  }
675
- function We(e) {
615
+ function je(e) {
676
616
  return e === "module" ? "module" : void 0;
677
617
  }
678
618
  function o(e, t) {
679
619
  return t ? ` ${e}="${s(t)}"` : "";
680
620
  }
681
- function G(e, t) {
621
+ function q(e, t) {
682
622
  return t ? ` ${e}` : "";
683
623
  }
684
624
  function s(e) {
685
625
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;");
686
626
  }
687
- function He(e) {
627
+ function Je(e) {
688
628
  return e.replaceAll("<", "\\u003c").replaceAll(">", "\\u003e").replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029");
689
629
  }
690
- function Ke(e, t) {
691
- const n = g(e.page, {
630
+ function Ye(e, t) {
631
+ const r = g(e.page, {
692
632
  data: e.data,
693
633
  locale: e.locale,
694
634
  path: e.path,
695
635
  pathname: e.pathname
696
- }), r = e.layouts.reduceRight(
636
+ }), n = e.layouts.reduceRight(
697
637
  (i, a) => g(a, {
698
638
  children: i,
699
639
  locale: e.locale,
700
640
  path: e.path,
701
641
  pathname: e.pathname
702
642
  }),
703
- n
643
+ r
704
644
  );
705
- return t ? Oe(t, r) : r;
645
+ return t ? Ie(t, n) : n;
706
646
  }
707
- function ze(e, t = {}) {
708
- return De({
647
+ function Ve(e, t = {}) {
648
+ return be({
709
649
  dev: t.dev,
710
650
  nonce: t.nonce,
711
651
  scripts: e.scripts
712
652
  });
713
653
  }
714
- function Qe(e, t = {}) {
715
- const n = ze(e, t), r = ee(Ke(e, n));
716
- return Ue({
654
+ function We(e, t = {}) {
655
+ const r = Ve(e, t), n = X(Ye(e, r));
656
+ return Ce({
717
657
  body: {
718
658
  data: e.data,
719
- html: r,
659
+ html: n,
720
660
  locale: t.locale,
721
661
  navigation: e.render.mode === "static" ? "document" : t.navigation
722
662
  },
@@ -726,34 +666,34 @@ function Qe(e, t = {}) {
726
666
  links: e.links,
727
667
  metadata: e.metadata,
728
668
  nonce: t.nonce,
729
- scripts: n.scripts(),
669
+ scripts: r.scripts(),
730
670
  styles: t.styles,
731
671
  title: t.title
732
672
  });
733
673
  }
734
- function gt(e, t = {}) {
735
- const n = Qe(e, t);
736
- return new Response(n, {
674
+ function at(e, t = {}) {
675
+ const r = We(e, t);
676
+ return new Response(r, {
737
677
  headers: {
738
678
  "content-type": "text/html; charset=utf-8"
739
679
  }
740
680
  });
741
681
  }
742
682
  const h = /* @__PURE__ */ new WeakMap();
743
- function ht(e) {
683
+ function st(e) {
744
684
  return h.get(e);
745
685
  }
746
- function At(e) {
686
+ function ut(e) {
747
687
  return h.get(e)?.clientIp;
748
688
  }
749
- function St(e, t) {
689
+ function dt(e, t) {
750
690
  h.set(e, t);
751
691
  }
752
- function $t(e, t) {
753
- const n = h.get(e);
754
- n && h.set(t, n);
692
+ function lt(e, t) {
693
+ const r = h.get(e);
694
+ r && h.set(t, r);
755
695
  }
756
- const Xe = {
696
+ const He = {
757
697
  backgroundLifetime: !1,
758
698
  crossOriginIsolationHeaders: !1,
759
699
  nonceInjection: !1,
@@ -764,70 +704,65 @@ const Xe = {
764
704
  webSocket: !1,
765
705
  webTransport: !1
766
706
  };
767
- function vt(e) {
707
+ function ft(e) {
768
708
  return {
769
709
  capabilities: {
770
- ...Xe,
710
+ ...He,
771
711
  ...e.capabilities
772
712
  },
773
713
  name: e.name
774
714
  };
775
715
  }
776
- function Ze(e, t) {
777
- const n = [...new Set(t)], r = n.filter(
716
+ function Ke(e, t) {
717
+ const r = [...new Set(t)], n = r.filter(
778
718
  (i) => !e.capabilities[i]
779
719
  );
780
720
  return {
781
721
  adapter: e.name,
782
- missing: r,
783
- ok: r.length === 0,
784
- required: n
722
+ missing: n,
723
+ ok: n.length === 0,
724
+ required: r
785
725
  };
786
726
  }
787
- function Et(e, t) {
788
- const n = Ze(e, t);
789
- if (!n.ok)
727
+ function pt(e, t) {
728
+ const r = Ke(e, t);
729
+ if (!r.ok)
790
730
  throw new Error(
791
- `Adapter "${e.name}" does not support required capabilities: ${n.missing.join(", ")}.`
731
+ `Adapter "${e.name}" does not support required capabilities: ${r.missing.join(", ")}.`
792
732
  );
793
- return n;
733
+ return r;
794
734
  }
795
735
  export {
796
- st as A,
797
- mt as B,
798
- lt as C,
799
- De as D,
800
- Oe as E,
801
- T as F,
802
- $t as G,
803
- ie as H,
804
- ht as I,
805
- Pe as S,
806
- gt as a,
807
- Ke as b,
808
- ze as c,
809
- vt as d,
810
- Ue as e,
811
- Qe as f,
812
- ut as g,
813
- ft as h,
814
- nt as i,
815
- J as j,
816
- oe as k,
817
- dt as l,
818
- _e as m,
819
- pt as n,
820
- Et as o,
821
- ct as p,
822
- Ze as q,
823
- Me as r,
824
- St as s,
825
- C as t,
826
- it as u,
827
- yt as v,
828
- At as w,
736
+ lt as A,
737
+ st as B,
738
+ k as F,
739
+ re as H,
740
+ Oe as S,
741
+ at as a,
742
+ Ye as b,
743
+ Ve as c,
744
+ ft as d,
745
+ Ce as e,
746
+ We as f,
747
+ et as g,
748
+ nt as h,
749
+ Xe as i,
750
+ G as j,
751
+ ne as k,
752
+ tt as l,
753
+ De as m,
754
+ it as n,
755
+ pt as o,
756
+ Ke as p,
757
+ C as q,
758
+ xe as r,
759
+ dt as s,
760
+ ot as t,
761
+ ut as u,
762
+ Ze as v,
763
+ ct as w,
829
764
  rt as x,
830
- at as y,
831
- ot as z
765
+ be as y,
766
+ Ie as z
832
767
  };
833
- //# sourceMappingURL=index-0MNiR_wo.js.map
768
+ //# sourceMappingURL=index-LYve1rQp.js.map