aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/prettier-fmt.yml76
-rw-r--r--.github/workflows/zig-fmt.yml87
-rw-r--r--.prettierignore7
-rw-r--r--.prettierrc14
-rw-r--r--bench/cat/cat.mjs5
-rw-r--r--bench/copyfile/node.mitata.mjs12
-rw-r--r--bench/expect-to-equal/index.ts2
-rw-r--r--bench/fetch/bun.js4
-rw-r--r--bench/fetch/deno.js4
-rw-r--r--bench/fetch/node.mjs4
-rw-r--r--bench/ffi/deno.js5
-rw-r--r--bench/hot-module-reloading/css-stress-test/browser.js24
-rw-r--r--bench/hot-module-reloading/css-stress-test/read-frames.js24
-rw-r--r--bench/hot-module-reloading/css-stress-test/src/index.tsx5
-rw-r--r--bench/hot-module-reloading/css-stress-test/src/main.tsx20
-rw-r--r--bench/json-stringify/bun.js8
-rw-r--r--bench/log/bun.js4
-rw-r--r--bench/module-loader/create.js12
-rw-r--r--bench/modules/node_os/bun.js21
-rw-r--r--bench/modules/node_os/node.mjs21
-rw-r--r--bench/react-hello-world/react-hello-world.deno.jsx4
-rw-r--r--bench/react-hello-world/react-hello-world.node.js3285
-rw-r--r--bench/react-hello-world/react-hello-world.node.jsx4
-rw-r--r--bench/scanner/scan-imports-only.js4
-rw-r--r--bench/snippets/array-map.mjs42
-rw-r--r--bench/snippets/assert.mjs5
-rw-r--r--bench/snippets/async-overhead.mjs11
-rw-r--r--bench/snippets/buffer-read.js4
-rw-r--r--bench/snippets/buffer.js9
-rw-r--r--bench/snippets/callbacks-overhead.mjs22
-rw-r--r--bench/snippets/concat.js34
-rw-r--r--bench/snippets/console-log.mjs9
-rw-r--r--bench/snippets/deep-equals.js14
-rw-r--r--bench/snippets/define-properties.mjs9
-rw-r--r--bench/snippets/dns.node.mjs14
-rw-r--r--bench/snippets/dns.ts56
-rw-r--r--bench/snippets/escapeHTML.js9
-rw-r--r--bench/snippets/ffi-overhead.mjs31
-rw-r--r--bench/snippets/index-of.mjs2
-rw-r--r--bench/snippets/react-dom-render.bun.js56
-rw-r--r--bench/snippets/return-await.mjs1
-rw-r--r--bench/snippets/transpiler.mjs6
-rw-r--r--bench/websocket-server/chat-client.mjs15
-rw-r--r--bench/websocket-server/chat-server.bun.js9
-rw-r--r--bench/websocket-server/chat-server.deno.mjs9
-rw-r--r--bench/websocket-server/chat-server.node.mjs8
-rw-r--r--examples/html-rewriter.ts23
-rw-r--r--examples/lambda.ts130
-rw-r--r--examples/macros/components/covid19.tsx11
-rw-r--r--examples/macros/components/example.jsx12
-rw-r--r--examples/macros/fetchCSV.tsx6
-rw-r--r--examples/macros/matchInFile.tsx4
-rw-r--r--examples/macros/mystery-box.ts5
-rw-r--r--examples/openInEditor.js3
-rw-r--r--examples/react-fast-refresh-test/src/main.tsx15
-rw-r--r--examples/react-file-system-router/index.tsx22
-rw-r--r--examples/react-file-system-router/pages/index.tsx6
-rw-r--r--examples/react-file-system-router/pages/one.tsx2
-rw-r--r--examples/react-file-system-router/pages/two.tsx2
-rw-r--r--examples/sha.js15
-rw-r--r--examples/spawn.ts4
-rw-r--r--misctools/gen-unicode-table.js40
-rw-r--r--misctools/headers-cleaner.js43
-rw-r--r--misctools/mime.js23
-rw-r--r--misctools/publish-examples.js51
-rw-r--r--package.json2
-rw-r--r--src/api/demo/lib/api.ts18
-rw-r--r--src/api/demo/pages/index.tsx12
-rw-r--r--src/api/demo/pages/scan.tsx14
-rw-r--r--src/api/demo/schema.d.ts319
-rw-r--r--src/api/demo/schema.js137
-rw-r--r--src/bun.js/api/server.zig2
-rw-r--r--src/bun.js/node-dns.exports.js43
-rw-r--r--src/bun.js/node-tls.exports.js1
-rw-r--r--src/bun.js/wasi-runner.js11
-rw-r--r--src/darwin_c.zig40
-rw-r--r--src/deps/uws.zig4
-rw-r--r--src/fallback.ts9
-rw-r--r--src/http_client_async.zig14
-rw-r--r--src/linux_c.zig3
-rw-r--r--src/node-fallbacks/@vercel_fetch.js8
-rw-r--r--src/node-fallbacks/crypto.js15
-rw-r--r--src/node-fallbacks/events.js71
-rw-r--r--src/node-fallbacks/url.js81
-rw-r--r--src/runtime.footer.bun.js6
-rw-r--r--src/runtime.footer.js6
-rw-r--r--src/runtime.footer.node.js3
-rw-r--r--src/runtime.footer.with-refresh.js6
-rw-r--r--src/runtime.js43
-rw-r--r--src/runtime/errors.ts6
-rw-r--r--src/runtime/hmr.ts314
-rw-r--r--src/runtime/regenerator.ts41
-rw-r--r--src/string_immutable.zig2
-rw-r--r--src/test/fixtures/double-export-default-bug.jsx12
-rw-r--r--src/test/fixtures/simple-150x.jsx42
-rw-r--r--src/test/fixtures/simple.jsx30
-rw-r--r--test/bun.js/.prettierignore2
-rw-r--r--test/bun.js/baz.js1
-rw-r--r--test/bun.js/buffer.test.js5
-rw-r--r--test/bun.js/bun-server.test.ts8
-rw-r--r--test/bun.js/bun-write.test.js2
-rw-r--r--test/bun.js/disabled-module.test.js94
-rw-r--r--test/bun.js/fetch.test.js2
-rw-r--r--test/bun.js/fetch_headers.test.js20
-rw-r--r--test/bun.js/repro_2005.test.js1
-rw-r--r--test/snippets/code-simplification-neql-define.js20
-rw-r--r--test/snippets/export.js5
-rw-r--r--test/snippets/jsx-entities.jsx5
-rw-r--r--test/snippets/latin1-chars-in-regexp.js34
-rw-r--r--test/snippets/optional-chain-with-function.js8
-rw-r--r--test/snippets/react-context-value-func.tsx2
-rw-r--r--test/snippets/simple-lit-example.ts8
-rw-r--r--test/snippets/spread_with_key.tsx7
-rw-r--r--test/snippets/string-escapes.js34
-rw-r--r--test/snippets/styledcomponents-output.js20
-rw-r--r--test/snippets/template-literal.js15
-rw-r--r--test/snippets/type-only-imports.ts3
117 files changed, 1764 insertions, 4295 deletions
diff --git a/.github/workflows/prettier-fmt.yml b/.github/workflows/prettier-fmt.yml
new file mode 100644
index 000000000..877b34a6f
--- /dev/null
+++ b/.github/workflows/prettier-fmt.yml
@@ -0,0 +1,76 @@
+name: prettier
+
+on:
+ pull_request:
+ branches:
+ - main
+ - jarred/test-actions
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ prettier-fmt:
+ name: prettier
+ runs-on: ubuntu-latest
+ outputs:
+ prettier_fmt_errs: ${{ steps.fmt.outputs.prettier_fmt_errs }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: recursive
+
+ - id: setup
+ name: Setup
+ uses: oven-sh/setup-bun@v1
+ with:
+ bun-version: latest
+ - id: install
+ name: Install prettier
+ run: bun install
+ - name: Run prettier
+ id: fmt
+ run: |
+ rm -f .failed
+ bun prettier --check "./bench/**/*.{ts,tsx,js,jsx,mjs}" "./test/**/*.{ts,tsx,js,jsx,mjs}" "./src/**/*.{ts,tsx,js,jsx}" --config .prettierrc.cjs 2> prettier-fmt.err > prettier-fmt1.err || echo 'failed' > .failed
+
+ if [ -s .failed ]; then
+ delimiter="$(openssl rand -hex 8)"
+ echo "prettier_fmt_errs<<${delimiter}" >> "${GITHUB_OUTPUT}"
+ cat prettier-fmt.err >> "${GITHUB_OUTPUT}"
+ cat prettier-fmt1.err >> "${GITHUB_OUTPUT}"
+ echo "${delimiter}" >> "${GITHUB_OUTPUT}"
+ fi
+ - name: Comment on PR
+ if: steps.fmt.outputs.prettier_fmt_errs != ''
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: prettier-fmt
+ message: |
+ ❌ @${{ github.actor }} `prettier` reported errors
+
+ ```js
+ ${{ steps.fmt.outputs.prettier_fmt_errs }}
+ ```
+
+ To one-off fix this manually, run:
+ ```sh
+ bun fmt
+ ```
+
+ You might need to run `bun install` locally and configure your text editor to [auto-format on save](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).
+
+ <sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
+ - name: Uncomment on PR
+ if: steps.fmt.outputs.prettier_fmt_errs == ''
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: prettier-fmt
+ mode: upsert
+ create_if_not_exists: false
+ message: |
+ ✅ `prettier` errors have been resolved. Thank you.
+
+ <sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
+ - name: Fail the job
+ if: steps.fmt.outputs.prettier_fmt_errs != ''
+ run: exit 1
diff --git a/.github/workflows/zig-fmt.yml b/.github/workflows/zig-fmt.yml
new file mode 100644
index 000000000..9f4e2207a
--- /dev/null
+++ b/.github/workflows/zig-fmt.yml
@@ -0,0 +1,87 @@
+name: zig-fmt
+
+env:
+ ZIG_VERSION: 0.11.0-dev.1783+436e99d13
+
+on:
+ pull_request:
+ branches:
+ - main
+ - jarred/test-actions
+ paths:
+ - "src/**/*.zig"
+ - "src/*.zig"
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ zig-fmt:
+ name: zig fmt
+ runs-on: ubuntu-latest
+ outputs:
+ zig_fmt_errs: ${{ steps.fmt.outputs.zig_fmt_errs }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ - name: Install zig
+ run: |
+ curl https://ziglang.org/builds/zig-linux-x86_64-${{env.ZIG_VERSION}}.tar.xz -L -o zig.tar.xz
+ tar -xf zig.tar.xz
+ sudo mv zig-linux-x86_64-${{env.ZIG_VERSION}}/zig /usr/local/bin
+ - name: Run zig fmt
+ id: fmt
+ run: |
+ zig fmt --check src/*.zig src/**/*.zig 2> zig-fmt.err > zig-fmt.err2 || echo "Failed"
+ delimiter="$(openssl rand -hex 8)"
+ echo "zig_fmt_errs<<${delimiter}" >> "${GITHUB_OUTPUT}"
+
+ if [ -s zig-fmt.err ]; then
+ echo "// The following errors occurred:" >> "${GITHUB_OUTPUT}"
+ cat zig-fmt.err >> "${GITHUB_OUTPUT}"
+ fi
+
+ if [ -s zig-fmt.err2 ]; then
+ echo "// The following files were not formatted:" >> "${GITHUB_OUTPUT}"
+ cat zig-fmt.err2 >> "${GITHUB_OUTPUT}"
+ fi
+
+ echo "${delimiter}" >> "${GITHUB_OUTPUT}"
+ - name: Comment on PR
+ if: steps.fmt.outputs.zig_fmt_errs != ''
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: zig-fmt
+ message: |
+ ❌ @${{ github.actor }} `zig fmt` reported errors. Consider configuring your text editor to [auto-format on save](https://github.com/ziglang/vscode-zig)
+
+ ```zig
+ // # zig fmt --check src/*.zig src/**/*.zig
+ ${{ steps.fmt.outputs.zig_fmt_errs }}
+ ```
+
+ To one-off fix this manually, run:
+
+ ```sh
+ zig fmt src/*.zig src/**/*.zig
+ ```
+
+ <sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
+ <sup>zig v${{env.ZIG_VERSION}}</sup>
+
+ - name: Uncomment on PR
+ if: steps.fmt.outputs.zig_fmt_errs == ''
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: zig-fmt
+ mode: upsert
+ create_if_not_exists: false
+ message: |
+ ✅ `zig fmt` errors have been resolved. Thank you.
+
+ <sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup>
+ <sup>zig v${{env.ZIG_VERSION}}</sup>
+
+ - name: Fail the job
+ if: steps.fmt.outputs.zig_fmt_errs != ''
+ run: exit 1
diff --git a/.prettierignore b/.prettierignore
index 1283490d0..b9249b91c 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -6,3 +6,10 @@ test/bun.js/bundled
# src/api/demo
test/snapshots
test/snapshots-no-hmr
+src/bun.js/WebKit
+src/bun.js/builtins/js
+src/*.out.js
+src/*out.*.js
+src/deps
+src/test/fixtures
+src/react-refresh.js
diff --git a/.prettierrc b/.prettierrc
deleted file mode 100644
index eab23fd80..000000000
--- a/.prettierrc
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "arrowParens": "avoid",
- "printWidth": 120,
- "trailingComma": "all",
- "useTabs": false,
- "overrides": [
- {
- "files": "README.md",
- "options": {
- "printWidth": 80
- }
- }
- ]
-}
diff --git a/bench/cat/cat.mjs b/bench/cat/cat.mjs
index fc8719829..1dd8186fd 100644
--- a/bench/cat/cat.mjs
+++ b/bench/cat/cat.mjs
@@ -6,7 +6,4 @@ const arg = process.argv.slice(1);
// TODO: remove Buffer.from() when readFileSync() returns Buffer
-for (let i = 0; i < count; i++)
- console.log(
- arg.map((file) => Buffer.from(readFileSync(file, "utf8"))).join("")
- );
+for (let i = 0; i < count; i++) console.log(arg.map(file => Buffer.from(readFileSync(file, "utf8"))).join(""));
diff --git a/bench/copyfile/node.mitata.mjs b/bench/copyfile/node.mitata.mjs
index aa77245e1..379150487 100644
--- a/bench/copyfile/node.mitata.mjs
+++ b/bench/copyfile/node.mitata.mjs
@@ -7,14 +7,8 @@ function runner(ready) {
for (let i = 0; i < size; i++) {
rand[i] = (Math.random() * 1024 * 1024) | 0;
}
- const dest = `/tmp/fs-test-copy-file-${(
- (Math.random() * 10000000 + 100) |
- 0
- ).toString(32)}`;
- const src = `/tmp/fs-test-copy-file-${(
- (Math.random() * 10000000 + 100) |
- 0
- ).toString(32)}`;
+ const dest = `/tmp/fs-test-copy-file-${((Math.random() * 10000000 + 100) | 0).toString(32)}`;
+ const src = `/tmp/fs-test-copy-file-${((Math.random() * 10000000 + 100) | 0).toString(32)}`;
writeFileSync(src, Buffer.from(rand.buffer), { encoding: "buffer" });
const { size: fileSize } = statSync(src);
if (fileSize !== rand.byteLength) {
@@ -35,6 +29,6 @@ runner((src, dest, rand) =>
// );
// }
// }
- })
+ }),
);
await run();
diff --git a/bench/expect-to-equal/index.ts b/bench/expect-to-equal/index.ts
index f67b2c645..2a5e4b80c 100644
--- a/bench/expect-to-equal/index.ts
+++ b/bench/expect-to-equal/index.ts
@@ -1 +1 @@
-console.log("Hello via Bun!"); \ No newline at end of file
+console.log("Hello via Bun!");
diff --git a/bench/fetch/bun.js b/bench/fetch/bun.js
index 7559b467e..96e7275a8 100644
--- a/bench/fetch/bun.js
+++ b/bench/fetch/bun.js
@@ -6,9 +6,7 @@ bench(`fetch(https://example.com) x ${count}`, async () => {
const requests = new Array(count);
for (let i = 0; i < requests.length; i++) {
- requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then((r) =>
- r.text(),
- );
+ requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then(r => r.text());
}
await Promise.all(requests);
diff --git a/bench/fetch/deno.js b/bench/fetch/deno.js
index 3eef41698..1117a38df 100644
--- a/bench/fetch/deno.js
+++ b/bench/fetch/deno.js
@@ -6,9 +6,7 @@ bench(`fetch(https://example.com) x ${count}`, async () => {
const requests = new Array(count);
for (let i = 0; i < requests.length; i++) {
- requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then((r) =>
- r.text(),
- );
+ requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then(r => r.text());
}
await Promise.all(requests);
diff --git a/bench/fetch/node.mjs b/bench/fetch/node.mjs
index f61eeb0c6..96e7275a8 100644
--- a/bench/fetch/node.mjs
+++ b/bench/fetch/node.mjs
@@ -6,9 +6,7 @@ bench(`fetch(https://example.com) x ${count}`, async () => {
const requests = new Array(count);
for (let i = 0; i < requests.length; i++) {
- requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then((r) =>
- r.text()
- );
+ requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then(r => r.text());
}
await Promise.all(requests);
diff --git a/bench/ffi/deno.js b/bench/ffi/deno.js
index 8f4c76ca2..63ba6358c 100644
--- a/bench/ffi/deno.js
+++ b/bench/ffi/deno.js
@@ -1,10 +1,7 @@
import { run, bench, group } from "../node_modules/mitata/src/cli.mjs";
const extension = "darwin" !== Deno.build.os ? "so" : "dylib";
-const path = new URL(
- "src/target/release/libffi_napi_bench." + extension,
- import.meta.url,
-).pathname;
+const path = new URL("src/target/release/libffi_napi_bench." + extension, import.meta.url).pathname;
const {
symbols: { ffi_noop, ffi_hash, ffi_string },
diff --git a/bench/hot-module-reloading/css-stress-test/browser.js b/bench/hot-module-reloading/css-stress-test/browser.js
index 15938dff2..d6bce108f 100644
--- a/bench/hot-module-reloading/css-stress-test/browser.js
+++ b/bench/hot-module-reloading/css-stress-test/browser.js
@@ -24,7 +24,7 @@ if (process.env.PROJECT === "bun") {
// bunProcess.stderr.pipe(process.stderr);
// bunProcess.stdout.pipe(process.stdout);
- bunProcess.once("error", (err) => {
+ bunProcess.once("error", err => {
console.error("❌ bun error", err);
process.exit(1);
});
@@ -32,19 +32,15 @@ if (process.env.PROJECT === "bun") {
bunProcess?.kill(0);
});
} else if (process.env.PROJECT === "next") {
- const bunProcess = child_process.spawn(
- "./node_modules/.bin/next",
- ["--port", "8080"],
- {
- cwd: process.cwd(),
- stdio: "ignore",
- env: {
- ...process.env,
- },
-
- shell: false,
+ const bunProcess = child_process.spawn("./node_modules/.bin/next", ["--port", "8080"], {
+ cwd: process.cwd(),
+ stdio: "ignore",
+ env: {
+ ...process.env,
},
- );
+
+ shell: false,
+ });
}
const delay = new Promise((resolve, reject) => {
@@ -111,7 +107,7 @@ async function main() {
return runPage();
}
-main().catch((error) =>
+main().catch(error =>
setTimeout(() => {
throw error;
}),
diff --git a/bench/hot-module-reloading/css-stress-test/read-frames.js b/bench/hot-module-reloading/css-stress-test/read-frames.js
index 9e264b4df..089e97e83 100644
--- a/bench/hot-module-reloading/css-stress-test/read-frames.js
+++ b/bench/hot-module-reloading/css-stress-test/read-frames.js
@@ -4,9 +4,7 @@ const path = require("path");
const PROJECT = process.env.PROJECT || "bun";
const percentile = require("percentile");
const PACKAGE_NAME = process.env.PACKAGE_NAME;
-const label = `${PACKAGE_NAME}@${
- require(PACKAGE_NAME + "/package.json").version
-}`;
+const label = `${PACKAGE_NAME}@${require(PACKAGE_NAME + "/package.json").version}`;
const BASEFOLDER = path.resolve(PROJECT);
const OUTFILE = path.join(process.cwd(), process.env.OUTFILE);
@@ -20,10 +18,10 @@ const TOTAL_FRAMES = VALID_TIMES.length;
const timings = fs
.readFileSync(BASEFOLDER + "/frames.all.clean", "utf8")
.split("\n")
- .map((a) => a.replace(/[Ran:'\.]?/gm, "").trim())
- .filter((a) => parseInt(a, 10))
- .filter((a) => a.length > 0 && VALID_TIMES.includes(BigInt(parseInt(a, 10))))
- .map((num) => BigInt(num));
+ .map(a => a.replace(/[Ran:'\.]?/gm, "").trim())
+ .filter(a => parseInt(a, 10))
+ .filter(a => a.length > 0 && VALID_TIMES.includes(BigInt(parseInt(a, 10))))
+ .map(num => BigInt(num));
timings.sort();
@@ -47,7 +45,7 @@ const report = {
name: PACKAGE_NAME,
version: require(PACKAGE_NAME + "/package.json").version,
},
- timestamps: timings.map((a) => Number(a)),
+ timestamps: timings.map(a => Number(a)),
frameTimes: frameTime,
percentileMs: {
50: percentile(50, frameTime) / 10,
@@ -67,9 +65,7 @@ fs.writeFileSync(
"." +
process.env.SLEEP_INTERVAL +
"ms." +
- `${process.platform}-${
- process.arch === "arm64" ? "aarch64" : process.arch
- }` +
+ `${process.platform}-${process.arch === "arm64" ? "aarch64" : process.arch}` +
".json",
),
JSON.stringify(report, null, 2),
@@ -99,9 +95,5 @@ console.log(
timings.length,
"/",
TOTAL_FRAMES,
- "(" +
- Math.round(
- Math.max(Math.min(1.0, timings.length / TOTAL_FRAMES), 0) * 100,
- ) +
- "%)",
+ "(" + Math.round(Math.max(Math.min(1.0, timings.length / TOTAL_FRAMES), 0) * 100) + "%)",
);
diff --git a/bench/hot-module-reloading/css-stress-test/src/index.tsx b/bench/hot-module-reloading/css-stress-test/src/index.tsx
index 35e7fceab..7ca290f48 100644
--- a/bench/hot-module-reloading/css-stress-test/src/index.tsx
+++ b/bench/hot-module-reloading/css-stress-test/src/index.tsx
@@ -3,10 +3,7 @@ import classNames from "classnames";
import ReactDOM from "react-dom";
const Base = ({}) => {
- const name =
- typeof location !== "undefined"
- ? decodeURIComponent(location.search.substring(1))
- : null;
+ const name = typeof location !== "undefined" ? decodeURIComponent(location.search.substring(1)) : null;
return <Main productName={name} />;
};
diff --git a/bench/hot-module-reloading/css-stress-test/src/main.tsx b/bench/hot-module-reloading/css-stress-test/src/main.tsx
index 2093d924f..9707deaae 100644
--- a/bench/hot-module-reloading/css-stress-test/src/main.tsx
+++ b/bench/hot-module-reloading/css-stress-test/src/main.tsx
@@ -4,8 +4,8 @@ export const Main = (props: { productName: string; cssInJS?: string }) => {
<header>
<div className="Title">CSS HMR Stress Test!</div>
<p className="Description">
- This page visually tests how quickly a bundler can update{" "}
- {props.cssInJS ? "CSS-in-JS" : "CSS"} over Hot Module Reloading.
+ This page visually tests how quickly a bundler can update {props.cssInJS ? "CSS-in-JS" : "CSS"} over Hot
+ Module Reloading.
</p>
</header>
<main className="main">
@@ -19,9 +19,7 @@ export const Main = (props: { productName: string; cssInJS?: string }) => {
<div className="ProgressBar-container">
<div className="ProgressBar"></div>
</div>
- <div className="SectionLabel">
- The progress bar should move from left to right smoothly.
- </div>
+ <div className="SectionLabel">The progress bar should move from left to right smoothly.</div>
</section>
<section>
@@ -42,21 +40,15 @@ export const Main = (props: { productName: string; cssInJS?: string }) => {
<div className="Spinner"></div>
</div>
</div>
- <div className="SectionLabel">
- The spinners should rotate &amp; change color smoothly.
- </div>
+ <div className="SectionLabel">The spinners should rotate &amp; change color smoothly.</div>
</section>
</main>
<footer>
- <div className="SectionLabel FooterLabel">
- There are no CSS animations on this page.
- </div>
+ <div className="SectionLabel FooterLabel">There are no CSS animations on this page.</div>
<div className="Bundler-container">
<div className="Bundler">{props.productName}</div>
- <div className="Bundler-updateRate">
- {props.cssInJS ? "CSS-in-JS framework: " + props.cssInJS : ""}
- </div>
+ <div className="Bundler-updateRate">{props.cssInJS ? "CSS-in-JS framework: " + props.cssInJS : ""}</div>
</div>
</footer>
</>
diff --git a/bench/json-stringify/bun.js b/bench/json-stringify/bun.js
index 8c9893794..22f29deb4 100644
--- a/bench/json-stringify/bun.js
+++ b/bench/json-stringify/bun.js
@@ -1,12 +1,8 @@
import { bench, run } from "mitata";
-bench("JSON.stringify({hello: 'world'})", () =>
- JSON.stringify({ hello: "world" }),
-);
+bench("JSON.stringify({hello: 'world'})", () => JSON.stringify({ hello: "world" }));
const otherUint8Array = new Uint8Array(1024);
-bench("Uint8Array.from(otherUint8Array)", () =>
- Uint8Array.from(otherUint8Array),
-);
+bench("Uint8Array.from(otherUint8Array)", () => Uint8Array.from(otherUint8Array));
run();
diff --git a/bench/log/bun.js b/bench/log/bun.js
index a2f5dd73e..43728fd64 100644
--- a/bench/log/bun.js
+++ b/bench/log/bun.js
@@ -1,7 +1,5 @@
import { bench, run } from "mitata";
bench("console.log('hello')", () => console.log("hello"));
-bench("console.log({ hello: 'object' })", () =>
- console.log({ hello: "object" }),
-);
+bench("console.log({ hello: 'object' })", () => console.log({ hello: "object" }));
await run();
diff --git a/bench/module-loader/create.js b/bench/module-loader/create.js
index 8c20307af..a26e2a61e 100644
--- a/bench/module-loader/create.js
+++ b/bench/module-loader/create.js
@@ -47,11 +47,7 @@ fs.writeFileSync(
output + `/file${count}.mjs`,
`
export const THE_END = true;
- ${
- saveStack
- ? `globalThis.evaluationOrder.push("${output}/file${count}.mjs");`
- : ""
- }
+ ${saveStack ? `globalThis.evaluationOrder.push("${output}/file${count}.mjs");` : ""}
`,
"utf8",
);
@@ -60,11 +56,7 @@ fs.writeFileSync(
output + `/file${count}.js`,
`
module.exports.THE_END = true;
- ${
- saveStack
- ? `globalThis.evaluationOrder.push("${output}/file${count}.js");`
- : ""
- }
+ ${saveStack ? `globalThis.evaluationOrder.push("${output}/file${count}.js");` : ""}
`,
"utf8",
);
diff --git a/bench/modules/node_os/bun.js b/bench/modules/node_os/bun.js
index 0047b77e7..217fae47d 100644
--- a/bench/modules/node_os/bun.js
+++ b/bench/modules/node_os/bun.js
@@ -1,5 +1,24 @@
import { bench, run } from "mitata";
-import { cpus, endianness, arch, uptime, networkInterfaces, getPriority, totalmem, freemem, homedir, hostname, loadavg, platform, release, setPriority, tmpdir, type, userInfo, version } from "node:os";
+import {
+ cpus,
+ endianness,
+ arch,
+ uptime,
+ networkInterfaces,
+ getPriority,
+ totalmem,
+ freemem,
+ homedir,
+ hostname,
+ loadavg,
+ platform,
+ release,
+ setPriority,
+ tmpdir,
+ type,
+ userInfo,
+ version,
+} from "node:os";
bench("cpus()", () => cpus());
bench("networkInterfaces()", () => networkInterfaces());
diff --git a/bench/modules/node_os/node.mjs b/bench/modules/node_os/node.mjs
index 0047b77e7..217fae47d 100644
--- a/bench/modules/node_os/node.mjs
+++ b/bench/modules/node_os/node.mjs
@@ -1,5 +1,24 @@
import { bench, run } from "mitata";
-import { cpus, endianness, arch, uptime, networkInterfaces, getPriority, totalmem, freemem, homedir, hostname, loadavg, platform, release, setPriority, tmpdir, type, userInfo, version } from "node:os";
+import {
+ cpus,
+ endianness,
+ arch,
+ uptime,
+ networkInterfaces,
+ getPriority,
+ totalmem,
+ freemem,
+ homedir,
+ hostname,
+ loadavg,
+ platform,
+ release,
+ setPriority,
+ tmpdir,
+ type,
+ userInfo,
+ version,
+} from "node:os";
bench("cpus()", () => cpus());
bench("networkInterfaces()", () => networkInterfaces());
diff --git a/bench/react-hello-world/react-hello-world.deno.jsx b/bench/react-hello-world/react-hello-world.deno.jsx
index fabbfcfcb..0bea2574a 100644
--- a/bench/react-hello-world/react-hello-world.deno.jsx
+++ b/bench/react-hello-world/react-hello-world.deno.jsx
@@ -18,8 +18,8 @@ const headers = {
};
Deno.serve(
- async (req) => {
+ async req => {
return new Response(await renderToReadableStream(<App />), headers);
},
- { port: 8080 }
+ { port: 8080 },
);
diff --git a/bench/react-hello-world/react-hello-world.node.js b/bench/react-hello-world/react-hello-world.node.js
index df9f0eaee..f2c7ae635 100644
--- a/bench/react-hello-world/react-hello-world.node.js
+++ b/bench/react-hello-world/react-hello-world.node.js
@@ -17,15 +17,9 @@ var Kd = (e, n, i, s) => {
return e;
};
var Dc = (e, n, i) => (
- (i = e != null ? Gd(Jd(e)) : {}),
- Kd(
- n || !e || !e.__esModule
- ? Ac(i, "default", { value: e, enumerable: !0 })
- : i,
- e
- )
+ (i = e != null ? Gd(Jd(e)) : {}), Kd(n || !e || !e.__esModule ? Ac(i, "default", { value: e, enumerable: !0 }) : i, e)
);
-var Nc = an(($) => {
+var Nc = an($ => {
"use strict";
var Ai = Symbol.for("react.element"),
qd = Symbol.for("react.portal"),
@@ -42,8 +36,7 @@ var Nc = an(($) => {
function up(e) {
return e === null || typeof e != "object"
? null
- : ((e = (Oc && e[Oc]) || e["@@iterator"]),
- typeof e == "function" ? e : null);
+ : ((e = (Oc && e[Oc]) || e["@@iterator"]), typeof e == "function" ? e : null);
}
var Bc = {
isMounted: function () {
@@ -56,16 +49,13 @@ var Nc = an(($) => {
Uc = Object.assign,
jc = {};
function sa(e, n, i) {
- (this.props = e),
- (this.context = n),
- (this.refs = jc),
- (this.updater = i || Bc);
+ (this.props = e), (this.context = n), (this.refs = jc), (this.updater = i || Bc);
}
sa.prototype.isReactComponent = {};
sa.prototype.setState = function (e, n) {
if (typeof e != "object" && typeof e != "function" && e != null)
throw Error(
- "setState(...): takes an object of state variables to update or a function which returns an object of state variables."
+ "setState(...): takes an object of state variables to update or a function which returns an object of state variables.",
);
this.updater.enqueueSetState(this, e, n, "setState");
};
@@ -75,10 +65,7 @@ var Nc = an(($) => {
function Hc() {}
Hc.prototype = sa.prototype;
function Hu(e, n, i) {
- (this.props = e),
- (this.context = n),
- (this.refs = jc),
- (this.updater = i || Bc);
+ (this.props = e), (this.context = n), (this.refs = jc), (this.updater = i || Bc);
}
var Wu = (Hu.prototype = new Hc());
Wu.constructor = Hu;
@@ -94,9 +81,7 @@ var Nc = an(($) => {
c = null,
m = null;
if (n != null)
- for (s in (n.ref !== void 0 && (m = n.ref),
- n.key !== void 0 && (c = "" + n.key),
- n))
+ for (s in (n.ref !== void 0 && (m = n.ref), n.key !== void 0 && (c = "" + n.key), n))
Wc.call(n, s) && !zc.hasOwnProperty(s) && (v[s] = n[s]);
var S = arguments.length - 2;
if (S === 1) v.children = i;
@@ -104,8 +89,7 @@ var Nc = an(($) => {
for (var E = Array(S), x = 0; x < S; x++) E[x] = arguments[x + 2];
v.children = E;
}
- if (e && e.defaultProps)
- for (s in ((S = e.defaultProps), S)) v[s] === void 0 && (v[s] = S[s]);
+ if (e && e.defaultProps) for (s in ((S = e.defaultProps), S)) v[s] === void 0 && (v[s] = S[s]);
return {
$$typeof: Ai,
type: e,
@@ -139,9 +123,7 @@ var Nc = an(($) => {
}
var Lc = /\/+/g;
function ju(e, n) {
- return typeof e == "object" && e !== null && e.key != null
- ? fp("" + e.key)
- : n.toString(36);
+ return typeof e == "object" && e !== null && e.key != null ? fp("" + e.key) : n.toString(36);
}
function Ml(e, n, i, s, v) {
var c = typeof e;
@@ -174,14 +156,7 @@ var Nc = an(($) => {
}))
: v != null &&
($u(v) &&
- (v = cp(
- v,
- i +
- (!v.key || (m && m.key === v.key)
- ? ""
- : ("" + v.key).replace(Lc, "$&/") + "/") +
- e
- )),
+ (v = cp(v, i + (!v.key || (m && m.key === v.key) ? "" : ("" + v.key).replace(Lc, "$&/") + "/") + e)),
n.push(v)),
1
);
@@ -192,17 +167,14 @@ var Nc = an(($) => {
m += Ml(c, n, i, E, v);
}
else if (((E = up(e)), typeof E == "function"))
- for (e = E.call(e), S = 0; !(c = e.next()).done; )
- (c = c.value), (E = s + ju(c, S++)), (m += Ml(c, n, i, E, v));
+ for (e = E.call(e), S = 0; !(c = e.next()).done; ) (c = c.value), (E = s + ju(c, S++)), (m += Ml(c, n, i, E, v));
else if (c === "object")
throw (
((n = String(e)),
Error(
"Objects are not valid as a React child (found: " +
- (n === "[object Object]"
- ? "object with keys {" + Object.keys(e).join(", ") + "}"
- : n) +
- "). If you meant to render a collection of children, use an array instead."
+ (n === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : n) +
+ "). If you meant to render a collection of children, use an array instead.",
))
);
return m;
@@ -224,13 +196,11 @@ var Nc = an(($) => {
(n = n()),
n.then(
function (i) {
- (e._status === 0 || e._status === -1) &&
- ((e._status = 1), (e._result = i));
+ (e._status === 0 || e._status === -1) && ((e._status = 1), (e._result = i));
},
function (i) {
- (e._status === 0 || e._status === -1) &&
- ((e._status = 2), (e._result = i));
- }
+ (e._status === 0 || e._status === -1) && ((e._status = 2), (e._result = i));
+ },
),
e._status === -1 && ((e._status = 0), (e._result = n));
}
@@ -252,7 +222,7 @@ var Nc = an(($) => {
function () {
n.apply(this, arguments);
},
- i
+ i,
);
},
count: function (e) {
@@ -272,10 +242,7 @@ var Nc = an(($) => {
);
},
only: function (e) {
- if (!$u(e))
- throw Error(
- "React.Children.only expected to receive a single React element child."
- );
+ if (!$u(e)) throw Error("React.Children.only expected to receive a single React element child.");
return e;
},
};
@@ -288,11 +255,7 @@ var Nc = an(($) => {
$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = pp;
$.cloneElement = function (e, n, i) {
if (e == null)
- throw Error(
- "React.cloneElement(...): The argument must be a React element, but you passed " +
- e +
- "."
- );
+ throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
var s = Uc({}, e.props),
v = e.key,
c = e.ref,
@@ -304,10 +267,7 @@ var Nc = an(($) => {
e.type && e.type.defaultProps)
)
var S = e.type.defaultProps;
- for (E in n)
- Wc.call(n, E) &&
- !zc.hasOwnProperty(E) &&
- (s[E] = n[E] === void 0 && S !== void 0 ? S[E] : n[E]);
+ for (E in n) Wc.call(n, E) && !zc.hasOwnProperty(E) && (s[E] = n[E] === void 0 && S !== void 0 ? S[E] : n[E]);
}
var E = arguments.length - 2;
if (E === 1) s.children = i;
@@ -415,8 +375,7 @@ var Vc = an((N, Bl) => {
(function () {
"use strict";
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" &&
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ==
- "function" &&
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
var e = "18.2.0",
n = Symbol.for("react.element"),
@@ -475,23 +434,13 @@ var Vc = an((N, Bl) => {
(ft.ReactDebugCurrentFrame = _e), (ft.ReactCurrentActQueue = q);
function Me(h) {
{
- for (
- var b = arguments.length, k = new Array(b > 1 ? b - 1 : 0), T = 1;
- T < b;
- T++
- )
- k[T - 1] = arguments[T];
+ for (var b = arguments.length, k = new Array(b > 1 ? b - 1 : 0), T = 1; T < b; T++) k[T - 1] = arguments[T];
Er("warn", h, k);
}
}
function B(h) {
{
- for (
- var b = arguments.length, k = new Array(b > 1 ? b - 1 : 0), T = 1;
- T < b;
- T++
- )
- k[T - 1] = arguments[T];
+ for (var b = arguments.length, k = new Array(b > 1 ? b - 1 : 0), T = 1; T < b; T++) k[T - 1] = arguments[T];
Er("error", h, k);
}
}
@@ -503,8 +452,7 @@ var Vc = an((N, Bl) => {
var U = k.map(function (M) {
return String(M);
});
- U.unshift("Warning: " + b),
- Function.prototype.apply.call(console[h], console, U);
+ U.unshift("Warning: " + b), Function.prototype.apply.call(console[h], console, U);
}
}
var tt = {};
@@ -517,7 +465,7 @@ var Vc = an((N, Bl) => {
B(
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
b,
- T
+ T,
),
(tt[I] = !0);
}
@@ -540,16 +488,13 @@ var Vc = an((N, Bl) => {
er = {};
Object.freeze(er);
function re(h, b, k) {
- (this.props = h),
- (this.context = b),
- (this.refs = er),
- (this.updater = k || bt);
+ (this.props = h), (this.context = b), (this.refs = er), (this.updater = k || bt);
}
(re.prototype.isReactComponent = {}),
(re.prototype.setState = function (h, b) {
if (typeof h != "object" && typeof h != "function" && h != null)
throw new Error(
- "setState(...): takes an object of state variables to update or a function which returns an object of state variables."
+ "setState(...): takes an object of state variables to update or a function which returns an object of state variables.",
);
this.updater.enqueueSetState(this, h, b, "setState");
}),
@@ -570,11 +515,7 @@ var Vc = an((N, Bl) => {
tr = function (h, b) {
Object.defineProperty(re.prototype, h, {
get: function () {
- Me(
- "%s(...) is deprecated in plain JavaScript React classes. %s",
- b[0],
- b[1]
- );
+ Me("%s(...) is deprecated in plain JavaScript React classes. %s", b[0], b[1]);
},
});
};
@@ -583,15 +524,10 @@ var Vc = an((N, Bl) => {
function nr() {}
nr.prototype = re.prototype;
function Rr(h, b, k) {
- (this.props = h),
- (this.context = b),
- (this.refs = er),
- (this.updater = k || bt);
+ (this.props = h), (this.context = b), (this.refs = er), (this.updater = k || bt);
}
var St = (Rr.prototype = new nr());
- (St.constructor = Rr),
- Le(St, re.prototype),
- (St.isPureReactComponent = !0);
+ (St.constructor = Rr), Le(St, re.prototype), (St.isPureReactComponent = !0);
function so() {
var h = { current: null };
return Object.seal(h), h;
@@ -622,7 +558,7 @@ var Vc = an((N, Bl) => {
return (
B(
"The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
- ve(h)
+ ve(h),
),
or(h)
);
@@ -641,7 +577,7 @@ var Vc = an((N, Bl) => {
if (
(typeof h.tag == "number" &&
B(
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.",
),
typeof h == "function")
)
@@ -713,11 +649,10 @@ var Vc = an((N, Bl) => {
((lr = !0),
B(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
- b
+ b,
));
};
- (k.isReactWarning = !0),
- Object.defineProperty(h, "key", { get: k, configurable: !0 });
+ (k.isReactWarning = !0), Object.defineProperty(h, "key", { get: k, configurable: !0 });
}
function va(h, b) {
var k = function () {
@@ -725,25 +660,19 @@ var Vc = an((N, Bl) => {
((fn = !0),
B(
"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
- b
+ b,
));
};
- (k.isReactWarning = !0),
- Object.defineProperty(h, "ref", { get: k, configurable: !0 });
+ (k.isReactWarning = !0), Object.defineProperty(h, "ref", { get: k, configurable: !0 });
}
function ga(h) {
- if (
- typeof h.ref == "string" &&
- xe.current &&
- h.__self &&
- xe.current.stateNode !== h.__self
- ) {
+ if (typeof h.ref == "string" && xe.current && h.__self && xe.current.stateNode !== h.__self) {
var b = dt(xe.current.type);
sr[b] ||
(B(
'Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
b,
- h.ref
+ h.ref,
),
(sr[b] = !0));
}
@@ -799,8 +728,7 @@ var Vc = an((N, Bl) => {
for (T in ee) I[T] === void 0 && (I[T] = ee[T]);
}
if (U || M) {
- var fe =
- typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
+ var fe = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
U && po(I, fe), M && va(I, fe);
}
return dn(h, U, M, H, z, xe.current, I);
@@ -811,11 +739,7 @@ var Vc = an((N, Bl) => {
}
function pn(h, b, k) {
if (h == null)
- throw new Error(
- "React.cloneElement(...): The argument must be a React element, but you passed " +
- h +
- "."
- );
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + h + ".");
var T,
I = Le({}, h.props),
U = h.key,
@@ -824,20 +748,16 @@ var Vc = an((N, Bl) => {
z = h._source,
Y = h._owner;
if (b != null) {
- pt(b) && ((M = b.ref), (Y = xe.current)),
- ke(b) && (je(b.key), (U = "" + b.key));
+ pt(b) && ((M = b.ref), (Y = xe.current)), ke(b) && (je(b.key), (U = "" + b.key));
var Q;
h.type && h.type.defaultProps && (Q = h.type.defaultProps);
for (T in b)
- ir.call(b, T) &&
- !fo.hasOwnProperty(T) &&
- (b[T] === void 0 && Q !== void 0 ? (I[T] = Q[T]) : (I[T] = b[T]));
+ ir.call(b, T) && !fo.hasOwnProperty(T) && (b[T] === void 0 && Q !== void 0 ? (I[T] = Q[T]) : (I[T] = b[T]));
}
var K = arguments.length - 2;
if (K === 1) I.children = k;
else if (K > 1) {
- for (var ee = Array(K), fe = 0; fe < K; fe++)
- ee[fe] = arguments[fe + 2];
+ for (var ee = Array(K), fe = 0; fe < K; fe++) ee[fe] = arguments[fe + 2];
I.children = ee;
}
return dn(h.type, U, M, H, z, Y, I);
@@ -861,9 +781,7 @@ var Vc = an((N, Bl) => {
return h.replace(hn, "$&/");
}
function Ir(h, b) {
- return typeof h == "object" && h !== null && h.key != null
- ? (je(h.key), go("" + h.key))
- : b.toString(36);
+ return typeof h == "object" && h !== null && h.key != null ? (je(h.key), go("" + h.key)) : b.toString(36);
}
function ur(h, b, k, T, I) {
var U = typeof h;
@@ -897,14 +815,7 @@ var Vc = an((N, Bl) => {
z != null &&
(wt(z) &&
(z.key && (!H || H.key !== z.key) && je(z.key),
- (z = ma(
- z,
- k +
- (z.key && (!H || H.key !== z.key)
- ? vn("" + z.key) + "/"
- : "") +
- Y
- ))),
+ (z = ma(z, k + (z.key && (!H || H.key !== z.key) ? vn("" + z.key) + "/" : "") + Y))),
b.push(z));
return 1;
}
@@ -912,31 +823,22 @@ var Vc = an((N, Bl) => {
ee,
fe = 0,
Se = T === "" ? Te : T + vo;
- if (ye(h))
- for (var yr = 0; yr < h.length; yr++)
- (K = h[yr]), (ee = Se + Ir(K, yr)), (fe += ur(K, b, k, ee, I));
+ if (ye(h)) for (var yr = 0; yr < h.length; yr++) (K = h[yr]), (ee = Se + Ir(K, yr)), (fe += ur(K, b, k, ee, I));
else {
var Pn = P(h);
if (typeof Pn == "function") {
var Wr = h;
Pn === Wr.entries &&
- (xt ||
- Me(
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
- ),
+ (xt || Me("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),
(xt = !0));
for (var Co = Pn.call(Wr), zr, Oa = 0; !(zr = Co.next()).done; )
- (K = zr.value),
- (ee = Se + Ir(K, Oa++)),
- (fe += ur(K, b, k, ee, I));
+ (K = zr.value), (ee = Se + Ir(K, Oa++)), (fe += ur(K, b, k, ee, I));
} else if (U === "object") {
var Eo = String(h);
throw new Error(
"Objects are not valid as a React child (found: " +
- (Eo === "[object Object]"
- ? "object with keys {" + Object.keys(h).join(", ") + "}"
- : Eo) +
- "). If you meant to render a collection of children, use an array instead."
+ (Eo === "[object Object]" ? "object with keys {" + Object.keys(h).join(", ") + "}" : Eo) +
+ "). If you meant to render a collection of children, use an array instead.",
);
}
}
@@ -968,7 +870,7 @@ var Vc = an((N, Bl) => {
function () {
b.apply(this, arguments);
},
- k
+ k,
);
}
function mo(h) {
@@ -979,10 +881,7 @@ var Vc = an((N, Bl) => {
);
}
function Ut(h) {
- if (!wt(h))
- throw new Error(
- "React.Children.only expected to receive a single React element child."
- );
+ if (!wt(h)) throw new Error("React.Children.only expected to receive a single React element child.");
return h;
}
function gn(h) {
@@ -1009,7 +908,7 @@ var Vc = an((N, Bl) => {
T ||
((T = !0),
B(
- "Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?"
+ "Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?",
)),
b.Provider
);
@@ -1048,7 +947,7 @@ var Vc = an((N, Bl) => {
k ||
((k = !0),
B(
- "Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"
+ "Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?",
)),
b.Consumer
);
@@ -1062,7 +961,7 @@ var Vc = an((N, Bl) => {
I ||
(Me(
"Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",
- M
+ M,
),
(I = !0));
},
@@ -1093,7 +992,7 @@ var Vc = an((N, Bl) => {
var M = h;
(M._status = Sa), (M._result = U);
}
- }
+ },
),
h._status === jt)
) {
@@ -1112,7 +1011,7 @@ Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))
Did you accidentally put curly braces around the import?`,
- I
+ I,
),
"default" in I ||
B(
@@ -1120,7 +1019,7 @@ Did you accidentally put curly braces around the import?`,
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))`,
- I
+ I,
),
I.default
);
@@ -1139,7 +1038,7 @@ Your code should look like:
},
set: function (U) {
B(
- "React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."
+ "React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.",
),
(T = U),
Object.defineProperty(k, "defaultProps", { enumerable: !0 });
@@ -1152,7 +1051,7 @@ Your code should look like:
},
set: function (U) {
B(
- "React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."
+ "React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.",
),
(I = U),
Object.defineProperty(k, "propTypes", { enumerable: !0 });
@@ -1165,25 +1064,22 @@ Your code should look like:
function ka(h) {
h != null && h.$$typeof === D
? B(
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).",
)
: typeof h != "function"
- ? B(
- "forwardRef requires a render function but was given %s.",
- h === null ? "null" : typeof h
- )
+ ? B("forwardRef requires a render function but was given %s.", h === null ? "null" : typeof h)
: h.length !== 0 &&
h.length !== 2 &&
B(
"forwardRef render functions accept exactly two parameters: props and ref. %s",
h.length === 1
? "Did you forget to use the ref parameter?"
- : "Any additional parameter will be undefined."
+ : "Any additional parameter will be undefined.",
),
h != null &&
(h.defaultProps != null || h.propTypes != null) &&
B(
- "forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"
+ "forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?",
);
var b = { $$typeof: E, render: h };
{
@@ -1231,10 +1127,7 @@ Your code should look like:
}
function Ta(h, b) {
yo(h) ||
- B(
- "memo: The first argument must be a component. Instead received: %s",
- h === null ? "null" : typeof h
- );
+ B("memo: The first argument must be a component. Instead received: %s", h === null ? "null" : typeof h);
var k = { $$typeof: D, type: h, compare: b === void 0 ? null : b };
{
var T;
@@ -1269,11 +1162,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
var k = h._context;
k.Consumer === h
? B(
- "Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"
+ "Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?",
)
: k.Provider === h &&
B(
- "Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"
+ "Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?",
);
}
return b.useContext(h);
@@ -1389,10 +1282,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
groupEnd: Le({}, h, { value: Et }),
});
}
- Tt < 0 &&
- B(
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
- );
+ Tt < 0 && B("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var Ee = ft.ReactCurrentDispatcher,
@@ -1489,9 +1379,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
`
` + H[Y].replace(" at new ", " at ");
return (
- h.displayName &&
- K.includes("<anonymous>") &&
- (K = K.replace("<anonymous>", h.displayName)),
+ h.displayName && K.includes("<anonymous>") && (K = K.replace("<anonymous>", h.displayName)),
typeof h == "function" && Br.set(h, K),
K
);
@@ -1566,18 +1454,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
M +
"` is invalid; it must be a function, usually from the `prop-types` package, but received `" +
typeof h[M] +
- "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
+ "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.",
);
throw ((z.name = "Invariant Violation"), z);
}
- H = h[M](
- b,
- M,
- T,
- k,
- null,
- "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"
- );
+ H = h[M](b, M, T, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (Y) {
H = Y;
}
@@ -1589,15 +1470,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
T || "React class",
k,
M,
- typeof H
+ typeof H,
),
pr(null)),
H instanceof Error &&
!(H.message in Ce) &&
- ((Ce[H.message] = !0),
- pr(I),
- B("Failed %s type: %s", k, H.message),
- pr(null));
+ ((Ce[H.message] = !0), pr(I), B("Failed %s type: %s", k, H.message), pr(null));
}
}
}
@@ -1665,15 +1543,12 @@ Check the top-level render call using <` +
if (!Ur[k]) {
Ur[k] = !0;
var T = "";
- h &&
- h._owner &&
- h._owner !== xe.current &&
- (T = " It was passed a child from " + dt(h._owner.type) + "."),
+ h && h._owner && h._owner !== xe.current && (T = " It was passed a child from " + dt(h._owner.type) + "."),
It(h),
B(
'Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',
k,
- T
+ T,
),
It(null);
}
@@ -1690,8 +1565,7 @@ Check the top-level render call using <` +
else if (h) {
var I = P(h);
if (typeof I == "function" && I !== h.entries)
- for (var U = I.call(h), M; !(M = U.next()).done; )
- wt(M.value) && Je(M.value, b);
+ for (var U = I.call(h), M; !(M = U.next()).done; ) wt(M.value) && Je(M.value, b);
}
}
}
@@ -1701,11 +1575,7 @@ Check the top-level render call using <` +
if (b == null || typeof b == "string") return;
var k;
if (typeof b == "function") k = b.propTypes;
- else if (
- typeof b == "object" &&
- (b.$$typeof === E || b.$$typeof === D)
- )
- k = b.propTypes;
+ else if (typeof b == "object" && (b.$$typeof === E || b.$$typeof === D)) k = b.propTypes;
else return;
if (k) {
var T = dt(b);
@@ -1715,13 +1585,13 @@ Check the top-level render call using <` +
var I = dt(b);
B(
"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
- I || "Unknown"
+ I || "Unknown",
);
}
typeof b.getDefaultProps == "function" &&
!b.getDefaultProps.isReactClassApproved &&
B(
- "getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."
+ "getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.",
);
}
}
@@ -1733,26 +1603,20 @@ Check the top-level render call using <` +
It(h),
B(
"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
- T
+ T,
),
It(null);
break;
}
}
- h.ref !== null &&
- (It(h),
- B("Invalid attribute `ref` supplied to `React.Fragment`."),
- It(null));
+ h.ref !== null && (It(h), B("Invalid attribute `ref` supplied to `React.Fragment`."), It(null));
}
}
function kn(h, b, k) {
var T = yo(h);
if (!T) {
var I = "";
- (h === void 0 ||
- (typeof h == "object" &&
- h !== null &&
- Object.keys(h).length === 0)) &&
+ (h === void 0 || (typeof h == "object" && h !== null && Object.keys(h).length === 0)) &&
(I +=
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var U = vt(b);
@@ -1764,13 +1628,12 @@ Check the top-level render call using <` +
? (M = "array")
: h !== void 0 && h.$$typeof === n
? ((M = "<" + (dt(h.type) || "Unknown") + " />"),
- (I =
- " Did you accidentally export a JSX literal instead of a component?"))
+ (I = " Did you accidentally export a JSX literal instead of a component?"))
: (M = typeof h),
B(
"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
M,
- I
+ I,
);
}
var H = ho.apply(this, arguments);
@@ -1786,15 +1649,13 @@ Check the top-level render call using <` +
Tn ||
((Tn = !0),
Me(
- "React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."
+ "React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.",
)),
Object.defineProperty(b, "type", {
enumerable: !1,
get: function () {
return (
- Me(
- "Factory.type is deprecated. Access the class directly before passing it to createFactory."
- ),
+ Me("Factory.type is deprecated. Access the class directly before passing it to createFactory."),
Object.defineProperty(this, "type", { value: h }),
h
);
@@ -1804,12 +1665,7 @@ Check the top-level render call using <` +
);
}
function ko(h, b, k) {
- for (
- var T = pn.apply(this, arguments), I = 2;
- I < arguments.length;
- I++
- )
- xn(arguments[I], T.type);
+ for (var T = pn.apply(this, arguments), I = 2; I < arguments.length; I++) xn(arguments[I], T.type);
return gr(T), T;
}
function To(h, b) {
@@ -1824,7 +1680,7 @@ Check the top-level render call using <` +
var I = T._updatedFibers.size;
I > 10 &&
Me(
- "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
+ "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.",
),
T._updatedFibers.clear();
}
@@ -1844,7 +1700,7 @@ Check the top-level render call using <` +
((Cn = !0),
typeof MessageChannel > "u" &&
B(
- "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
+ "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.",
));
var U = new MessageChannel();
(U.port1.onmessage = I), U.port2.postMessage(void 0);
@@ -1861,11 +1717,7 @@ Check the top-level render call using <` +
var k = q.isBatchingLegacy,
T;
try {
- if (
- ((q.isBatchingLegacy = !0),
- (T = h()),
- !k && q.didScheduleLegacyUpdate)
- ) {
+ if (((q.isBatchingLegacy = !0), (T = h()), !k && q.didScheduleLegacyUpdate)) {
var I = q.current;
I !== null && ((q.didScheduleLegacyUpdate = !1), Rn(I));
}
@@ -1874,11 +1726,7 @@ Check the top-level render call using <` +
} finally {
q.isBatchingLegacy = k;
}
- if (
- T !== null &&
- typeof T == "object" &&
- typeof T.then == "function"
- ) {
+ if (T !== null && typeof T == "object" && typeof T.then == "function") {
var U = T,
M = !1,
H = {
@@ -1890,7 +1738,7 @@ Check the top-level render call using <` +
},
function (Se) {
mr(b), fe(Se);
- }
+ },
);
},
};
@@ -1903,7 +1751,7 @@ Check the top-level render call using <` +
M ||
((Hr = !0),
B(
- "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
+ "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);",
));
}),
H
@@ -1915,9 +1763,7 @@ Check the top-level render call using <` +
Y !== null && (Rn(Y), (q.current = null));
var Q = {
then: function (ee, fe) {
- q.current === null
- ? ((q.current = []), Be(z, ee, fe))
- : ee(z);
+ q.current === null ? ((q.current = []), Be(z, ee, fe)) : ee(z);
},
};
return Q;
@@ -1935,7 +1781,7 @@ Check the top-level render call using <` +
function mr(h) {
h !== gt - 1 &&
B(
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
+ "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ",
),
(gt = h);
}
@@ -2013,20 +1859,15 @@ Check the top-level render call using <` +
(N.useTransition = Ar),
(N.version = e),
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" &&
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ==
- "function" &&
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(
- new Error()
- );
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" &&
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
})();
});
var ua = an((_v, Nu) => {
"use strict";
- process.env.NODE_ENV === "production"
- ? (Nu.exports = Nc())
- : (Nu.exports = Vc());
+ process.env.NODE_ENV === "production" ? (Nu.exports = Nc()) : (Nu.exports = Vc());
});
-var Wf = an((ca) => {
+var Wf = an(ca => {
"use strict";
var pf = ua(),
hp = require("stream"),
@@ -2036,13 +1877,7 @@ var Wf = an((ca) => {
Yc = {},
Gc = {};
function hf(e) {
- return qe.call(Gc, e)
- ? !0
- : qe.call(Yc, e)
- ? !1
- : vp.test(e)
- ? (Gc[e] = !0)
- : ((Yc[e] = !0), !1);
+ return qe.call(Gc, e) ? !0 : qe.call(Yc, e) ? !1 : vp.test(e) ? (Gc[e] = !0) : ((Yc[e] = !0), !1);
}
function Ge(e, n, i, s, v, c, m) {
(this.acceptsBooleans = n === 2 || n === 3 || n === 4),
@@ -2072,12 +1907,7 @@ var Wf = an((ca) => {
["contentEditable", "draggable", "spellCheck", "value"].forEach(function (e) {
Fe[e] = new Ge(e, 2, !1, e.toLowerCase(), null, !1, !1);
});
- [
- "autoReverse",
- "externalResourcesRequired",
- "focusable",
- "preserveAlpha",
- ].forEach(function (e) {
+ ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function (e) {
Fe[e] = new Ge(e, 2, !1, e, null, !1, !1);
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope"
@@ -2107,12 +1937,10 @@ var Wf = an((ca) => {
var n = e.replace(qu, ec);
Fe[n] = new Ge(n, 1, !1, e, null, !1, !1);
});
- "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type"
- .split(" ")
- .forEach(function (e) {
- var n = e.replace(qu, ec);
- Fe[n] = new Ge(n, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
- });
+ "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function (e) {
+ var n = e.replace(qu, ec);
+ Fe[n] = new Ge(n, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
+ });
["xml:base", "xml:lang", "xml:space"].forEach(function (e) {
var n = e.replace(qu, ec);
Fe[n] = new Ge(n, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
@@ -2120,15 +1948,7 @@ var Wf = an((ca) => {
["tabIndex", "crossOrigin"].forEach(function (e) {
Fe[e] = new Ge(e, 1, !1, e.toLowerCase(), null, !1, !1);
});
- Fe.xlinkHref = new Ge(
- "xlinkHref",
- 1,
- !1,
- "xlink:href",
- "http://www.w3.org/1999/xlink",
- !0,
- !1
- );
+ Fe.xlinkHref = new Ge("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function (e) {
Fe[e] = new Ge(e, 1, !1, e.toLowerCase(), null, !0, !0);
});
@@ -2251,7 +2071,7 @@ var Wf = an((ca) => {
function vf(e, n, i) {
if (typeof i != "object")
throw Error(
- "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
+ "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.",
);
n = !0;
for (var s in i)
@@ -2264,20 +2084,11 @@ var Wf = an((ca) => {
} else {
c = s;
var m = Xc.get(c);
- m !== void 0 ||
- ((m = Ye(c.replace(yp, "-$1").toLowerCase().replace(bp, "-ms-"))),
- Xc.set(c, m)),
+ m !== void 0 || ((m = Ye(c.replace(yp, "-$1").toLowerCase().replace(bp, "-ms-"))), Xc.set(c, m)),
(c = m),
- (v =
- typeof v == "number"
- ? v === 0 || qe.call(Hl, s)
- ? "" + v
- : v + "px"
- : Ye(("" + v).trim()));
+ (v = typeof v == "number" ? (v === 0 || qe.call(Hl, s) ? "" + v : v + "px") : Ye(("" + v).trim()));
}
- n
- ? ((n = !1), e.push(' style="', c, ":", v))
- : e.push(";", c, ":", v);
+ n ? ((n = !1), e.push(' style="', c, ":", v)) : e.push(";", c, ":", v);
}
}
n || e.push('"');
@@ -2294,11 +2105,7 @@ var Wf = an((ca) => {
case "suppressHydrationWarning":
return;
}
- if (
- !(2 < i.length) ||
- (i[0] !== "o" && i[0] !== "O") ||
- (i[1] !== "n" && i[1] !== "N")
- ) {
+ if (!(2 < i.length) || (i[0] !== "o" && i[0] !== "O") || (i[1] !== "n" && i[1] !== "N")) {
if (((n = Fe.hasOwnProperty(i) ? Fe[i] : null), n !== null)) {
switch (typeof s) {
case "function":
@@ -2312,9 +2119,7 @@ var Wf = an((ca) => {
s && e.push(" ", i, '=""');
break;
case 4:
- s === !0
- ? e.push(" ", i, '=""')
- : s !== !1 && e.push(" ", i, '="', Ye(s), '"');
+ s === !0 ? e.push(" ", i, '=""') : s !== !1 && e.push(" ", i, '="', Ye(s), '"');
break;
case 5:
isNaN(s) || e.push(" ", i, '="', Ye(s), '"');
@@ -2331,11 +2136,7 @@ var Wf = an((ca) => {
case "symbol":
return;
case "boolean":
- if (
- ((n = i.toLowerCase().slice(0, 5)),
- n !== "data-" && n !== "aria-")
- )
- return;
+ if (((n = i.toLowerCase().slice(0, 5)), n !== "data-" && n !== "aria-")) return;
}
e.push(" ", i, '="', Ye(s), '"');
}
@@ -2343,13 +2144,10 @@ var Wf = an((ca) => {
}
function Wl(e, n, i) {
if (n != null) {
- if (i != null)
- throw Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (i != null) throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof n != "object" || !("__html" in n))
throw Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
(n = n.__html), n != null && e.push("" + n);
}
@@ -2382,9 +2180,7 @@ var Wf = an((ca) => {
it(e, s, c, m);
}
}
- return (
- e.push(">"), Wl(e, v, i), typeof i == "string" ? (e.push(Ye(i)), null) : i
- );
+ return e.push(">"), Wl(e, v, i), typeof i == "string" ? (e.push(Ye(i)), null) : i;
}
var xp = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
Zc = new Map();
@@ -2471,19 +2267,13 @@ var Wf = an((ca) => {
m = E;
break;
case "dangerouslySetInnerHTML":
- throw Error(
- "`dangerouslySetInnerHTML` does not make sense on <textarea>."
- );
+ throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
default:
it(e, s, S, E);
}
if ((c === null && m !== null && (c = m), e.push(">"), R != null)) {
- if (c != null)
- throw Error(
- "If you supply `defaultValue` on a <textarea>, do not pass children."
- );
- if (Xu(R) && 1 < R.length)
- throw Error("<textarea> can only have at most one child.");
+ if (c != null) throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
+ if (Xu(R) && 1 < R.length) throw Error("<textarea> can only have at most one child.");
c = "" + R;
}
return (
@@ -2504,7 +2294,7 @@ var Wf = an((ca) => {
case "children":
case "dangerouslySetInnerHTML":
throw Error(
- "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
case "defaultChecked":
E = x;
@@ -2522,12 +2312,8 @@ var Wf = an((ca) => {
it(e, s, m, x);
}
return (
- R !== null
- ? it(e, s, "checked", R)
- : E !== null && it(e, s, "checked", E),
- c !== null
- ? it(e, s, "value", c)
- : S !== null && it(e, s, "value", S),
+ R !== null ? it(e, s, "checked", R) : E !== null && it(e, s, "checked", E),
+ c !== null ? it(e, s, "value", c) : S !== null && it(e, s, "value", S),
e.push("/>"),
null
);
@@ -2538,9 +2324,7 @@ var Wf = an((ca) => {
switch (V) {
case "children":
case "dangerouslySetInnerHTML":
- throw Error(
- "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
- );
+ throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");
default:
it(e, s, V, c);
}
@@ -2554,9 +2338,7 @@ var Wf = an((ca) => {
c = m;
break;
case "dangerouslySetInnerHTML":
- throw Error(
- "`dangerouslySetInnerHTML` does not make sense on <title>."
- );
+ throw Error("`dangerouslySetInnerHTML` does not make sense on <title>.");
default:
it(e, s, D, m);
}
@@ -2577,13 +2359,10 @@ var Wf = an((ca) => {
it(e, s, E, S);
}
if ((e.push(">"), m != null)) {
- if (c != null)
- throw Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (c != null) throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof m != "object" || !("__html" in m))
throw Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
(i = m.__html),
i != null &&
@@ -2595,7 +2374,7 @@ var Wf = an((ca) => {
? e.push(
`
`,
- i
+ i,
)
: e.push("" + i));
}
@@ -2629,8 +2408,7 @@ var Wf = an((ca) => {
case "children":
case "dangerouslySetInnerHTML":
throw Error(
- n +
- " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ n + " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
default:
it(e, s, te, c);
@@ -2646,12 +2424,9 @@ var Wf = an((ca) => {
case "missing-glyph":
return Vu(e, i, n, s);
case "html":
- return (
- v.insertionMode === 0 && e.push("<!DOCTYPE html>"), Vu(e, i, n, s)
- );
+ return v.insertionMode === 0 && e.push("<!DOCTYPE html>"), Vu(e, i, n, s);
default:
- if (n.indexOf("-") === -1 && typeof i.is != "string")
- return Vu(e, i, n, s);
+ if (n.indexOf("-") === -1 && typeof i.is != "string") return Vu(e, i, n, s);
e.push(Jt(n)), (m = c = null);
for (x in i)
if (qe.call(i, x) && ((S = i[x]), S != null))
@@ -2669,32 +2444,21 @@ var Wf = an((ca) => {
case "suppressHydrationWarning":
break;
default:
- hf(x) &&
- typeof S != "function" &&
- typeof S != "symbol" &&
- e.push(" ", x, '="', Ye(S), '"');
+ hf(x) && typeof S != "function" && typeof S != "symbol" && e.push(" ", x, '="', Ye(S), '"');
}
return e.push(">"), Wl(e, m, c), c;
}
}
function Jc(e, n, i) {
if ((e.push('<!--$?--><template id="'), i === null))
- throw Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw Error("An ID must have been assigned before we can complete the boundary.");
return e.push(i), e.push('"></template>');
}
function Tp(e, n, i, s) {
switch (i.insertionMode) {
case 0:
case 1:
- return (
- e.push('<div hidden id="'),
- e.push(n.segmentPrefix),
- (n = s.toString(16)),
- e.push(n),
- e.push('">')
- );
+ return e.push('<div hidden id="'), e.push(n.segmentPrefix), (n = s.toString(16)), e.push(n), e.push('">');
case 2:
return (
e.push('<svg aria-hidden="true" style="display:none" id="'),
@@ -2712,36 +2476,16 @@ var Wf = an((ca) => {
e.push('">')
);
case 4:
- return (
- e.push('<table hidden id="'),
- e.push(n.segmentPrefix),
- (n = s.toString(16)),
- e.push(n),
- e.push('">')
- );
+ return e.push('<table hidden id="'), e.push(n.segmentPrefix), (n = s.toString(16)), e.push(n), e.push('">');
case 5:
return (
- e.push('<table hidden><tbody id="'),
- e.push(n.segmentPrefix),
- (n = s.toString(16)),
- e.push(n),
- e.push('">')
+ e.push('<table hidden><tbody id="'), e.push(n.segmentPrefix), (n = s.toString(16)), e.push(n), e.push('">')
);
case 6:
- return (
- e.push('<table hidden><tr id="'),
- e.push(n.segmentPrefix),
- (n = s.toString(16)),
- e.push(n),
- e.push('">')
- );
+ return e.push('<table hidden><tr id="'), e.push(n.segmentPrefix), (n = s.toString(16)), e.push(n), e.push('">');
case 7:
return (
- e.push('<table hidden><colgroup id="'),
- e.push(n.segmentPrefix),
- (n = s.toString(16)),
- e.push(n),
- e.push('">')
+ e.push('<table hidden><colgroup id="'), e.push(n.segmentPrefix), (n = s.toString(16)), e.push(n), e.push('">')
);
default:
throw Error("Unknown insertion mode. This is a bug in React.");
@@ -2780,7 +2524,7 @@ var Wf = an((ca) => {
return "\\u2029";
default:
throw Error(
- "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
+ "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React",
);
}
});
@@ -2809,10 +2553,7 @@ var Wf = an((ca) => {
function Qc(e, n, i, s) {
return i.generateStaticMarkup
? (e.push(Ye(n)), !1)
- : (n === ""
- ? (e = s)
- : (s && e.push("<!-- -->"), e.push(Ye(n)), (e = !0)),
- e);
+ : (n === "" ? (e = s) : (s && e.push("<!-- -->"), e.push(Ye(n)), (e = !0)), e);
}
var Mi = Object.assign,
Rp = Symbol.for("react.element"),
@@ -2860,15 +2601,11 @@ var Wf = an((ca) => {
var n = e.render;
return (
(e = e.displayName),
- e ||
- ((e = n.displayName || n.name || ""),
- (e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef")),
+ e || ((e = n.displayName || n.name || ""), (e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef")),
e
);
case Rf:
- return (
- (n = e.displayName || null), n !== null ? n : Zu(e.type) || "Memo"
- );
+ return (n = e.displayName || null), n !== null ? n : Zu(e.type) || "Memo";
case tc:
(n = e._payload), (e = e._init);
try {
@@ -2891,46 +2628,31 @@ var Wf = an((ca) => {
(e.context._currentValue2 = e.parentValue), (e = e.parent);
var i = n.parent;
if (e === null) {
- if (i !== null)
- throw Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (i !== null) throw Error("The stacks must reach the root at the same time. This is a bug in React.");
} else {
- if (i === null)
- throw Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (i === null) throw Error("The stacks must reach the root at the same time. This is a bug in React.");
Jl(e, i);
}
n.context._currentValue2 = n.value;
}
}
function _f(e) {
- (e.context._currentValue2 = e.parentValue),
- (e = e.parent),
- e !== null && _f(e);
+ (e.context._currentValue2 = e.parentValue), (e = e.parent), e !== null && _f(e);
}
function Pf(e) {
var n = e.parent;
n !== null && Pf(n), (e.context._currentValue2 = e.value);
}
function Ff(e, n) {
- if (
- ((e.context._currentValue2 = e.parentValue), (e = e.parent), e === null)
- )
- throw Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
+ if (((e.context._currentValue2 = e.parentValue), (e = e.parent), e === null))
+ throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
e.depth === n.depth ? Jl(e, n) : Ff(e, n);
}
function Af(e, n) {
var i = n.parent;
if (i === null)
- throw Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
- e.depth === i.depth ? Jl(e, i) : Af(e, i),
- (n.context._currentValue2 = n.value);
+ throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
+ e.depth === i.depth ? Jl(e, i) : Af(e, i), (n.context._currentValue2 = n.value);
}
function Vl(e) {
var n = ro;
@@ -2967,35 +2689,21 @@ var Wf = an((ca) => {
if (
((e.context = typeof m == "object" && m !== null ? m._currentValue2 : s),
(m = n.getDerivedStateFromProps),
- typeof m == "function" &&
- ((m = m(i, v)), (v = m == null ? v : Mi({}, v, m)), (e.state = v)),
+ typeof m == "function" && ((m = m(i, v)), (v = m == null ? v : Mi({}, v, m)), (e.state = v)),
typeof n.getDerivedStateFromProps != "function" &&
typeof e.getSnapshotBeforeUpdate != "function" &&
- (typeof e.UNSAFE_componentWillMount == "function" ||
- typeof e.componentWillMount == "function"))
+ (typeof e.UNSAFE_componentWillMount == "function" || typeof e.componentWillMount == "function"))
)
if (
((n = e.state),
typeof e.componentWillMount == "function" && e.componentWillMount(),
- typeof e.UNSAFE_componentWillMount == "function" &&
- e.UNSAFE_componentWillMount(),
+ typeof e.UNSAFE_componentWillMount == "function" && e.UNSAFE_componentWillMount(),
n !== e.state && ef.enqueueReplaceState(e, e.state, null),
c.queue !== null && 0 < c.queue.length)
)
- if (
- ((n = c.queue),
- (m = c.replace),
- (c.queue = null),
- (c.replace = !1),
- m && n.length === 1)
- )
- e.state = n[0];
+ if (((n = c.queue), (m = c.replace), (c.queue = null), (c.replace = !1), m && n.length === 1)) e.state = n[0];
else {
- for (
- c = m ? n[0] : e.state, v = !0, m = m ? 1 : 0;
- m < n.length;
- m++
- ) {
+ for (c = m ? n[0] : e.state, v = !0, m = m ? 1 : 0; m < n.length; m++) {
var S = n[m];
(S = typeof S == "function" ? S.call(e, c, i, s) : S),
S != null && (v ? ((v = !1), (c = Mi({}, c, S))) : Mi(c, S));
@@ -3051,8 +2759,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return kr;
}
function rf() {
- if (0 < Ql)
- throw Error("Rendered more hooks than during the previous render");
+ if (0 < Ql) throw Error("Rendered more hooks than during the previous render");
return { memoizedState: null, queue: null, next: null };
}
function nc() {
@@ -3085,14 +2792,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return [oe.memoizedState, n];
}
return (
- (e =
- e === Df
- ? typeof n == "function"
- ? n()
- : n
- : i !== void 0
- ? i(n)
- : n),
+ (e = e === Df ? (typeof n == "function" ? n() : n) : i !== void 0 ? i(n) : n),
(oe.memoizedState = e),
(e = oe.queue = { last: null, dispatch: null }),
(e = e.dispatch = Up.bind(null, kr, e)),
@@ -3100,9 +2800,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
);
}
function of(e, n) {
- if (
- ((kr = to()), (oe = nc()), (n = n === void 0 ? null : n), oe !== null)
- ) {
+ if (((kr = to()), (oe = nc()), (n = n === void 0 ? null : n), oe !== null)) {
var i = oe.memoizedState;
if (i !== null && n !== null) {
var s = i[1];
@@ -3121,18 +2819,9 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return (e = e()), (oe.memoizedState = [e, n]), e;
}
function Up(e, n, i) {
- if (25 <= Ql)
- throw Error(
- "Too many re-renders. React limits the number of renders to prevent an infinite loop."
- );
+ if (25 <= Ql) throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
if (e === kr)
- if (
- ((Yl = !0),
- (e = { action: i, next: null }),
- ln === null && (ln = new Map()),
- (i = ln.get(n)),
- i === void 0)
- )
+ if (((Yl = !0), (e = { action: i, next: null }), ln === null && (ln = new Map()), (i = ln.get(n)), i === void 0))
ln.set(n, e);
else {
for (n = i; n.next !== null; ) n = n.next;
@@ -3182,15 +2871,8 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(e = e.id), (e = (e & ~(1 << (32 - zl(e) - 1))).toString(32) + n);
var i = Nl;
if (i === null)
- throw Error(
- "Invalid hook call. Hooks can only be called inside of the body of a function component."
- );
- return (
- (n = Li++),
- (e = ":" + i.idPrefix + "R" + e),
- 0 < n && (e += "H" + n.toString(32)),
- e + ":"
- );
+ throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");
+ return (n = Li++), (e = ":" + i.idPrefix + "R" + e), 0 < n && (e += "H" + n.toString(32)), e + ":";
},
useMutableSource: function (e, n) {
return to(), n(e._source);
@@ -3198,15 +2880,13 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
useSyncExternalStore: function (e, n, i) {
if (i === void 0)
throw Error(
- "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
+ "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.",
);
return i();
},
},
Nl = null,
- Gu =
- pf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .ReactCurrentDispatcher;
+ Gu = pf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
function Hp(e) {
return console.error(e), null;
}
@@ -3279,7 +2959,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
throw Error(
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' +
typeof e +
- '" instead'
+ '" instead',
);
return e;
}
@@ -3288,13 +2968,10 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
i(n),
(i = e.onFatalError),
i(n),
- e.destination !== null
- ? ((e.status = 2), e.destination.destroy(n))
- : ((e.status = 1), (e.fatalError = n));
+ e.destination !== null ? ((e.status = 2), e.destination.destroy(n)) : ((e.status = 1), (e.fatalError = n));
}
function lf(e, n, i, s, v) {
- for (kr = {}, rc = n, Li = 0, e = i(s, v); Yl; )
- (Yl = !1), (Li = 0), (Ql += 1), (oe = null), (e = i(s, v));
+ for (kr = {}, rc = n, Li = 0, e = i(s, v); Yl; ) (Yl = !1), (Li = 0), (Ql += 1), (oe = null), (e = i(s, v));
return oc(), e;
}
function sf(e, n, i, s) {
@@ -3308,10 +2985,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
for (var S in i)
if (!(S in c))
throw Error(
- (Zu(s) || "Unknown") +
- '.getChildContext(): key "' +
- S +
- '" is not defined in childContextTypes.'
+ (Zu(s) || "Unknown") + '.getChildContext(): key "' + S + '" is not defined in childContextTypes.',
);
s = Mi({}, m, i);
}
@@ -3331,21 +3005,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
if (i.prototype && i.prototype.isReactComponent) {
v = qc(i, n.legacyContext);
var c = i.contextType;
- (c = new i(
- s,
- typeof c == "object" && c !== null ? c._currentValue2 : v
- )),
- tf(c, i, s, v),
- sf(e, n, c, i);
+ (c = new i(s, typeof c == "object" && c !== null ? c._currentValue2 : v)), tf(c, i, s, v), sf(e, n, c, i);
} else {
(c = qc(i, n.legacyContext)), (v = lf(e, n, i, s, c));
var m = Li !== 0;
- if (
- typeof v == "object" &&
- v !== null &&
- typeof v.render == "function" &&
- v.$$typeof === void 0
- )
+ if (typeof v == "object" && v !== null && typeof v.render == "function" && v.$$typeof === void 0)
tf(v, i, s, c), sf(e, n, v, i);
else if (m) {
(s = n.treeContext), (n.treeContext = Ju(s, 1, 0));
@@ -3403,11 +3067,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
throw Error("ReactDOMServer does not yet support scope components.");
case Cf:
e: {
- (i = n.blockedBoundary),
- (v = n.blockedSegment),
- (c = s.fallback),
- (s = s.children),
- (m = new Set());
+ (i = n.blockedBoundary), (v = n.blockedSegment), (c = s.fallback), (s = s.children), (m = new Set());
var S = {
id: null,
rootSegmentID: -1,
@@ -3422,30 +3082,23 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
E = Gl(e, v.chunks.length, S, v.formatContext, !1, !1);
v.children.push(E), (v.lastPushedText = !1);
var x = Gl(e, 0, null, v.formatContext, !1, !1);
- (x.parentFlushed = !0),
- (n.blockedBoundary = S),
- (n.blockedSegment = x);
+ (x.parentFlushed = !0), (n.blockedBoundary = S), (n.blockedSegment = x);
try {
if (
(Ku(e, n, s),
e.responseState.generateStaticMarkup ||
- (x.lastPushedText &&
- x.textEmbedded &&
- x.chunks.push("<!-- -->")),
+ (x.lastPushedText && x.textEmbedded && x.chunks.push("<!-- -->")),
(x.status = 1),
Zl(S, x),
S.pendingTasks === 0)
)
break e;
} catch (R) {
- (x.status = 4),
- (S.forceClientRender = !0),
- (S.errorDigest = Bi(e, R));
+ (x.status = 4), (S.forceClientRender = !0), (S.errorDigest = Bi(e, R));
} finally {
(n.blockedBoundary = i), (n.blockedSegment = v);
}
- (n = ac(e, c, i, E, m, n.legacyContext, n.context, n.treeContext)),
- e.pingedTasks.push(n);
+ (n = ac(e, c, i, E, m, n.legacyContext, n.context, n.treeContext)), e.pingedTasks.push(n);
}
return;
}
@@ -3485,12 +3138,9 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(e = ro),
e === null)
)
- throw Error(
- "Tried to pop a Context at the root of the app. This is a bug in React."
- );
+ throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");
(s = e.parentValue),
- (e.context._currentValue2 =
- s === Fp ? e.context._defaultValue : s),
+ (e.context._currentValue2 = s === Fp ? e.context._defaultValue : s),
(e = ro = e.parent),
(n.context = e);
return;
@@ -3498,15 +3148,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(s = s.children), (s = s(i._currentValue2)), lt(e, n, s);
return;
case tc:
- (v = i._init),
- (i = v(i._payload)),
- (s = uf(i, s)),
- Qu(e, n, i, s, void 0);
+ (v = i._init), (i = v(i._payload)), (s = uf(i, s)), Qu(e, n, i, s, void 0);
return;
}
throw Error(
"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
- ((i == null ? i : typeof i) + ".")
+ ((i == null ? i : typeof i) + "."),
);
}
}
@@ -3518,7 +3165,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return;
case yf:
throw Error(
- "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
+ "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.",
);
case tc:
var s = i._init;
@@ -3532,8 +3179,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
if (
(i === null || typeof i != "object"
? (s = null)
- : ((s = (Kc && i[Kc]) || i["@@iterator"]),
- (s = typeof s == "function" ? s : null)),
+ : ((s = (Kc && i[Kc]) || i["@@iterator"]), (s = typeof s == "function" ? s : null)),
s && (s = s.call(i)))
) {
if (((i = s.next()), !i.done)) {
@@ -3548,29 +3194,16 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
((e = Object.prototype.toString.call(i)),
Error(
"Objects are not valid as a React child (found: " +
- (e === "[object Object]"
- ? "object with keys {" + Object.keys(i).join(", ") + "}"
- : e) +
- "). If you meant to render a collection of children, use an array instead."
+ (e === "[object Object]" ? "object with keys {" + Object.keys(i).join(", ") + "}" : e) +
+ "). If you meant to render a collection of children, use an array instead.",
))
);
}
typeof i == "string"
- ? ((s = n.blockedSegment),
- (s.lastPushedText = Qc(
- n.blockedSegment.chunks,
- i,
- e.responseState,
- s.lastPushedText
- )))
+ ? ((s = n.blockedSegment), (s.lastPushedText = Qc(n.blockedSegment.chunks, i, e.responseState, s.lastPushedText)))
: typeof i == "number" &&
((s = n.blockedSegment),
- (s.lastPushedText = Qc(
- n.blockedSegment.chunks,
- "" + i,
- e.responseState,
- s.lastPushedText
- )));
+ (s.lastPushedText = Qc(n.blockedSegment.chunks, "" + i, e.responseState, s.lastPushedText)));
}
function cf(e, n, i) {
for (var s = i.length, v = 0; v < s; v++) {
@@ -3590,45 +3223,19 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
try {
return lt(e, n, i);
} catch (E) {
- if (
- (oc(),
- typeof E == "object" && E !== null && typeof E.then == "function")
- ) {
+ if ((oc(), typeof E == "object" && E !== null && typeof E.then == "function")) {
i = E;
var m = n.blockedSegment,
- S = Gl(
- e,
- m.chunks.length,
- null,
- m.formatContext,
- m.lastPushedText,
- !0
- );
+ S = Gl(e, m.chunks.length, null, m.formatContext, m.lastPushedText, !0);
m.children.push(S),
(m.lastPushedText = !1),
- (e = ac(
- e,
- n.node,
- n.blockedBoundary,
- S,
- n.abortSet,
- n.legacyContext,
- n.context,
- n.treeContext
- ).ping),
+ (e = ac(e, n.node, n.blockedBoundary, S, n.abortSet, n.legacyContext, n.context, n.treeContext).ping),
i.then(e, e),
(n.blockedSegment.formatContext = s),
(n.legacyContext = v),
(n.context = c),
Vl(c);
- } else
- throw (
- ((n.blockedSegment.formatContext = s),
- (n.legacyContext = v),
- (n.context = c),
- Vl(c),
- E)
- );
+ } else throw ((n.blockedSegment.formatContext = s), (n.legacyContext = v), (n.context = c), Vl(c), E);
}
}
function Wp(e) {
@@ -3639,19 +3246,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
var s = e.blockedBoundary;
(e.blockedSegment.status = 3),
s === null
- ? (n.allPendingTasks--,
- n.status !== 2 &&
- ((n.status = 2),
- n.destination !== null && n.destination.push(null)))
+ ? (n.allPendingTasks--, n.status !== 2 && ((n.status = 2), n.destination !== null && n.destination.push(null)))
: (s.pendingTasks--,
s.forceClientRender ||
((s.forceClientRender = !0),
(s.errorDigest = n.onError(
- i === void 0
- ? Error(
- "The render was aborted by the server without a reason."
- )
- : i
+ i === void 0 ? Error("The render was aborted by the server without a reason.") : i,
)),
s.parentFlushed && n.clientRenderedBoundaries.push(s)),
s.fallbackAbortableTasks.forEach(function (v) {
@@ -3662,11 +3262,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
n.allPendingTasks === 0 && ((e = n.onAllReady), e()));
}
function Zl(e, n) {
- if (
- n.chunks.length === 0 &&
- n.children.length === 1 &&
- n.children[0].boundary === null
- ) {
+ if (n.chunks.length === 0 && n.children.length === 1 && n.children[0].boundary === null) {
var i = n.children[0];
(i.id = n.id), (i.parentFlushed = !0), i.status === 1 && Zl(e, i);
} else e.completedSegments.push(n);
@@ -3674,15 +3270,10 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
function Lf(e, n, i) {
if (n === null) {
if (i.parentFlushed) {
- if (e.completedRootSegment !== null)
- throw Error(
- "There can only be one root segment. This is a bug in React."
- );
+ if (e.completedRootSegment !== null) throw Error("There can only be one root segment. This is a bug in React.");
e.completedRootSegment = i;
}
- e.pendingRootTasks--,
- e.pendingRootTasks === 0 &&
- ((e.onShellError = Oi), (n = e.onShellReady), n());
+ e.pendingRootTasks--, e.pendingRootTasks === 0 && ((e.onShellError = Oi), (n = e.onShellReady), n());
} else
n.pendingTasks--,
n.forceClientRender ||
@@ -3693,10 +3284,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
n.fallbackAbortableTasks.clear())
: i.parentFlushed &&
i.status === 1 &&
- (Zl(n, i),
- n.completedSegments.length === 1 &&
- n.parentFlushed &&
- e.partialBoundaries.push(n)));
+ (Zl(n, i), n.completedSegments.length === 1 && n.parentFlushed && e.partialBoundaries.push(n)));
e.allPendingTasks--, e.allPendingTasks === 0 && ((e = e.onAllReady), e());
}
function ic(e) {
@@ -3718,19 +3306,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
try {
lt(S, m, m.node),
S.responseState.generateStaticMarkup ||
- (E.lastPushedText &&
- E.textEmbedded &&
- E.chunks.push("<!-- -->")),
+ (E.lastPushedText && E.textEmbedded && E.chunks.push("<!-- -->")),
m.abortSet.delete(m),
(E.status = 1),
Lf(S, m.blockedBoundary, E);
} catch (J) {
- if (
- (oc(),
- typeof J == "object" &&
- J !== null &&
- typeof J.then == "function")
- ) {
+ if ((oc(), typeof J == "object" && J !== null && typeof J.then == "function")) {
var x = m.ping;
J.then(x, x);
} else {
@@ -3793,7 +3374,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return c < s.length && (v = n.push(s[c])), v;
default:
throw Error(
- "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
+ "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.",
);
}
}
@@ -3813,8 +3394,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
e
);
if (0 < s.pendingTasks) {
- (s.rootSegmentID = e.nextSegmentId++),
- 0 < s.completedSegments.length && e.partialBoundaries.push(s);
+ (s.rootSegmentID = e.nextSegmentId++), 0 < s.completedSegments.length && e.partialBoundaries.push(s);
var v = e.responseState,
c = v.nextSuspenseID++;
return (
@@ -3833,30 +3413,15 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
jl(e, n, i),
n.push("<!--/$-->")
);
- if (
- (e.responseState.generateStaticMarkup || n.push("<!--$-->"),
- (i = s.completedSegments),
- i.length !== 1)
- )
- throw Error(
- "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
- );
- return (
- Kl(e, n, i[0]),
- (e = e.responseState.generateStaticMarkup ? !0 : n.push("<!--/$-->")),
- e
- );
+ if ((e.responseState.generateStaticMarkup || n.push("<!--$-->"), (i = s.completedSegments), i.length !== 1))
+ throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
+ return Kl(e, n, i[0]), (e = e.responseState.generateStaticMarkup ? !0 : n.push("<!--/$-->")), e;
}
function ff(e, n, i) {
- return (
- Tp(n, e.responseState, i.formatContext, i.id),
- Kl(e, n, i),
- Cp(n, i.formatContext)
- );
+ return Tp(n, e.responseState, i.formatContext, i.id), Kl(e, n, i), Cp(n, i.formatContext);
}
function df(e, n, i) {
- for (var s = i.completedSegments, v = 0; v < s.length; v++)
- Bf(e, n, i, s[v]);
+ for (var s = i.completedSegments, v = 0; v < s.length; v++) Bf(e, n, i, s[v]);
if (
((s.length = 0),
(e = e.responseState),
@@ -3867,30 +3432,19 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
? n.push('$RC("')
: ((e.sentCompleteBoundaryFunction = !0),
n.push(
- 'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'
+ 'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("',
)),
s === null)
)
- throw Error(
- "An ID must have been assigned before we can complete the boundary."
- );
- return (
- (i = i.toString(16)),
- n.push(s),
- n.push('","'),
- n.push(e.segmentPrefix),
- n.push(i),
- n.push('")</script>')
- );
+ throw Error("An ID must have been assigned before we can complete the boundary.");
+ return (i = i.toString(16)), n.push(s), n.push('","'), n.push(e.segmentPrefix), n.push(i), n.push('")</script>');
}
function Bf(e, n, i, s) {
if (s.status === 2) return !0;
var v = s.id;
if (v === -1) {
if ((s.id = i.rootSegmentID) === -1)
- throw Error(
- "A root segment ID must have been assigned by now. This is a bug in React."
- );
+ throw Error("A root segment ID must have been assigned by now. This is a bug in React.");
return ff(e, n, s);
}
return (
@@ -3901,7 +3455,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
? n.push('$RS("')
: ((e.sentCompleteSegmentFunction = !0),
n.push(
- 'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'
+ 'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("',
)),
n.push(e.segmentPrefix),
(v = v.toString(16)),
@@ -3937,13 +3491,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
? s.push('$RX("')
: ((S.sentClientRenderFunction = !0),
s.push(
- 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'
+ 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("',
)),
E === null)
)
- throw Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw Error("An ID must have been assigned before we can complete the boundary.");
if ((s.push(E), s.push('"'), x || R || D)) {
s.push(",");
var V = Yu(x || "");
@@ -4048,7 +3600,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
S = !0;
},
void 0,
- void 0
+ void 0,
)),
ic(e),
Uf(e, s),
@@ -4065,14 +3617,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
throw c;
if (!S)
throw Error(
- "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition."
+ "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.",
);
return m;
}
function $p(e, n) {
- (e.prototype = Object.create(n.prototype)),
- (e.prototype.constructor = e),
- (e.__proto__ = n);
+ (e.prototype = Object.create(n.prototype)), (e.prototype.constructor = e), (e.__proto__ = n);
}
var Np = (function (e) {
function n() {
@@ -4104,7 +3654,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(i.startedFlowing = !0), sc(s, i);
},
void 0,
- void 0
+ void 0,
);
return (i.request = s), ic(s), i;
}
@@ -4116,7 +3666,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
e,
n,
!0,
- 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server'
+ 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server',
);
};
ca.renderToStaticNodeStream = function (e, n) {
@@ -4127,12 +3677,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
e,
n,
!1,
- 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server'
+ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server',
);
};
ca.version = "18.2.0";
});
-var jd = an((_c) => {
+var jd = an(_c => {
"use strict";
var Yp = require("util"),
hd = ua(),
@@ -4143,36 +3693,22 @@ var jd = an((_c) => {
if (typeof n == "string") {
if (n.length !== 0)
if (2048 < 3 * n.length)
- 0 < le &&
- (Tr(e, pe.subarray(0, le)), (pe = new Uint8Array(2048)), (le = 0)),
- Tr(e, ts.encode(n));
+ 0 < le && (Tr(e, pe.subarray(0, le)), (pe = new Uint8Array(2048)), (le = 0)), Tr(e, ts.encode(n));
else {
var i = pe;
0 < le && (i = pe.subarray(le)), (i = ts.encodeInto(n, i));
var s = i.read;
(le += i.written),
- s < n.length &&
- (Tr(e, pe),
- (pe = new Uint8Array(2048)),
- (le = ts.encodeInto(n.slice(s), pe).written)),
+ s < n.length && (Tr(e, pe), (pe = new Uint8Array(2048)), (le = ts.encodeInto(n.slice(s), pe).written)),
le === 2048 && (Tr(e, pe), (pe = new Uint8Array(2048)), (le = 0));
}
} else
n.byteLength !== 0 &&
(2048 < n.byteLength
- ? (0 < le &&
- (Tr(e, pe.subarray(0, le)),
- (pe = new Uint8Array(2048)),
- (le = 0)),
- Tr(e, n))
+ ? (0 < le && (Tr(e, pe.subarray(0, le)), (pe = new Uint8Array(2048)), (le = 0)), Tr(e, n))
: ((i = pe.length - le),
i < n.byteLength &&
- (i === 0
- ? Tr(e, pe)
- : (pe.set(n.subarray(0, i), le),
- (le += i),
- Tr(e, pe),
- (n = n.subarray(i))),
+ (i === 0 ? Tr(e, pe) : (pe.set(n.subarray(0, i), le), (le += i), Tr(e, pe), (n = n.subarray(i))),
(pe = new Uint8Array(2048)),
(le = 0)),
pe.set(n, le),
@@ -4186,10 +3722,7 @@ var jd = an((_c) => {
return L(e, n), da;
}
function zf(e) {
- pe && 0 < le && e.write(pe.subarray(0, le)),
- (pe = null),
- (le = 0),
- (da = !0);
+ pe && 0 < le && e.write(pe.subarray(0, le)), (pe = null), (le = 0), (da = !0);
}
var ts = new Yp.TextEncoder();
function A(e) {
@@ -4201,13 +3734,7 @@ var jd = an((_c) => {
$f = {},
Nf = {};
function vd(e) {
- return et.call(Nf, e)
- ? !0
- : et.call($f, e)
- ? !1
- : Gp.test(e)
- ? (Nf[e] = !0)
- : (($f[e] = !0), !1);
+ return et.call(Nf, e) ? !0 : et.call($f, e) ? !1 : Gp.test(e) ? (Nf[e] = !0) : (($f[e] = !0), !1);
}
function Xe(e, n, i, s, v, c, m) {
(this.acceptsBooleans = n === 2 || n === 3 || n === 4),
@@ -4237,12 +3764,7 @@ var jd = an((_c) => {
["contentEditable", "draggable", "spellCheck", "value"].forEach(function (e) {
De[e] = new Xe(e, 2, !1, e.toLowerCase(), null, !1, !1);
});
- [
- "autoReverse",
- "externalResourcesRequired",
- "focusable",
- "preserveAlpha",
- ].forEach(function (e) {
+ ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function (e) {
De[e] = new Xe(e, 2, !1, e, null, !1, !1);
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope"
@@ -4272,12 +3794,10 @@ var jd = an((_c) => {
var n = e.replace(Sc, wc);
De[n] = new Xe(n, 1, !1, e, null, !1, !1);
});
- "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type"
- .split(" ")
- .forEach(function (e) {
- var n = e.replace(Sc, wc);
- De[n] = new Xe(n, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
- });
+ "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function (e) {
+ var n = e.replace(Sc, wc);
+ De[n] = new Xe(n, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
+ });
["xml:base", "xml:lang", "xml:space"].forEach(function (e) {
var n = e.replace(Sc, wc);
De[n] = new Xe(n, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
@@ -4285,15 +3805,7 @@ var jd = an((_c) => {
["tabIndex", "crossOrigin"].forEach(function (e) {
De[e] = new Xe(e, 1, !1, e.toLowerCase(), null, !1, !1);
});
- De.xlinkHref = new Xe(
- "xlinkHref",
- 1,
- !1,
- "xlink:href",
- "http://www.w3.org/1999/xlink",
- !0,
- !1
- );
+ De.xlinkHref = new Xe("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function (e) {
De[e] = new Xe(e, 1, !1, e.toLowerCase(), null, !0, !0);
});
@@ -4432,7 +3944,7 @@ var jd = an((_c) => {
function gd(e, n, i) {
if (typeof i != "object")
throw Error(
- "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
+ "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.",
);
n = !0;
for (var s in i)
@@ -4445,18 +3957,9 @@ var jd = an((_c) => {
} else {
c = s;
var m = Gf.get(c);
- m !== void 0 ||
- ((m = A(
- Ae(c.replace(Jp, "-$1").toLowerCase().replace(Qp, "-ms-"))
- )),
- Gf.set(c, m)),
+ m !== void 0 || ((m = A(Ae(c.replace(Jp, "-$1").toLowerCase().replace(Qp, "-ms-")))), Gf.set(c, m)),
(c = m),
- (v =
- typeof v == "number"
- ? v === 0 || et.call(rs, s)
- ? "" + v
- : v + "px"
- : Ae(("" + v).trim()));
+ (v = typeof v == "number" ? (v === 0 || et.call(rs, s) ? "" + v : v + "px") : Ae(("" + v).trim()));
}
n ? ((n = !1), e.push(ah, c, Xf, v)) : e.push(ih, c, Xf, v);
}
@@ -4479,11 +3982,7 @@ var jd = an((_c) => {
case "suppressHydrationWarning":
return;
}
- if (
- !(2 < i.length) ||
- (i[0] !== "o" && i[0] !== "O") ||
- (i[1] !== "n" && i[1] !== "N")
- ) {
+ if (!(2 < i.length) || (i[0] !== "o" && i[0] !== "O") || (i[1] !== "n" && i[1] !== "N")) {
if (((n = De.hasOwnProperty(i) ? De[i] : null), n !== null)) {
switch (typeof s) {
case "function":
@@ -4497,9 +3996,7 @@ var jd = an((_c) => {
s && e.push(sn, i, Zf);
break;
case 4:
- s === !0
- ? e.push(sn, i, Zf)
- : s !== !1 && e.push(sn, i, fa, Ae(s), no);
+ s === !0 ? e.push(sn, i, Zf) : s !== !1 && e.push(sn, i, fa, Ae(s), no);
break;
case 5:
isNaN(s) || e.push(sn, i, fa, Ae(s), no);
@@ -4516,11 +4013,7 @@ var jd = an((_c) => {
case "symbol":
return;
case "boolean":
- if (
- ((n = i.toLowerCase().slice(0, 5)),
- n !== "data-" && n !== "aria-")
- )
- return;
+ if (((n = i.toLowerCase().slice(0, 5)), n !== "data-" && n !== "aria-")) return;
}
e.push(sn, i, fa, Ae(s), no);
}
@@ -4530,13 +4023,10 @@ var jd = an((_c) => {
Jf = A("/>");
function ns(e, n, i) {
if (n != null) {
- if (i != null)
- throw Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (i != null) throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof n != "object" || !("__html" in n))
throw Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
(n = n.__html), n != null && e.push("" + n);
}
@@ -4570,9 +4060,7 @@ var jd = an((_c) => {
st(e, s, c, m);
}
}
- return (
- e.push(un), ns(e, v, i), typeof i == "string" ? (e.push(Ae(i)), null) : i
- );
+ return e.push(un), ns(e, v, i), typeof i == "string" ? (e.push(Ae(i)), null) : i;
}
var fc = A(`
`),
@@ -4662,19 +4150,13 @@ var jd = an((_c) => {
m = E;
break;
case "dangerouslySetInnerHTML":
- throw Error(
- "`dangerouslySetInnerHTML` does not make sense on <textarea>."
- );
+ throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
default:
st(e, s, S, E);
}
if ((c === null && m !== null && (c = m), e.push(un), R != null)) {
- if (c != null)
- throw Error(
- "If you supply `defaultValue` on a <textarea>, do not pass children."
- );
- if (vc(R) && 1 < R.length)
- throw Error("<textarea> can only have at most one child.");
+ if (c != null) throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
+ if (vc(R) && 1 < R.length) throw Error("<textarea> can only have at most one child.");
c = "" + R;
}
return (
@@ -4694,7 +4176,7 @@ var jd = an((_c) => {
case "children":
case "dangerouslySetInnerHTML":
throw Error(
- "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
case "defaultChecked":
E = x;
@@ -4712,12 +4194,8 @@ var jd = an((_c) => {
st(e, s, m, x);
}
return (
- R !== null
- ? st(e, s, "checked", R)
- : E !== null && st(e, s, "checked", E),
- c !== null
- ? st(e, s, "value", c)
- : S !== null && st(e, s, "value", S),
+ R !== null ? st(e, s, "checked", R) : E !== null && st(e, s, "checked", E),
+ c !== null ? st(e, s, "value", c) : S !== null && st(e, s, "value", S),
e.push(Jf),
null
);
@@ -4728,9 +4206,7 @@ var jd = an((_c) => {
switch (V) {
case "children":
case "dangerouslySetInnerHTML":
- throw Error(
- "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
- );
+ throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");
default:
st(e, s, V, c);
}
@@ -4744,9 +4220,7 @@ var jd = an((_c) => {
c = m;
break;
case "dangerouslySetInnerHTML":
- throw Error(
- "`dangerouslySetInnerHTML` does not make sense on <title>."
- );
+ throw Error("`dangerouslySetInnerHTML` does not make sense on <title>.");
default:
st(e, s, D, m);
}
@@ -4767,13 +4241,10 @@ var jd = an((_c) => {
st(e, s, E, S);
}
if ((e.push(un), m != null)) {
- if (c != null)
- throw Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (c != null) throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof m != "object" || !("__html" in m))
throw Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
(i = m.__html),
i != null &&
@@ -4814,8 +4285,7 @@ var jd = an((_c) => {
case "children":
case "dangerouslySetInnerHTML":
throw Error(
- n +
- " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ n + " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
default:
st(e, s, te, c);
@@ -4833,8 +4303,7 @@ var jd = an((_c) => {
case "html":
return v.insertionMode === 0 && e.push(uh), cc(e, i, n, s);
default:
- if (n.indexOf("-") === -1 && typeof i.is != "string")
- return cc(e, i, n, s);
+ if (n.indexOf("-") === -1 && typeof i.is != "string") return cc(e, i, n, s);
e.push(Kt(n)), (m = c = null);
for (x in i)
if (et.call(i, x) && ((S = i[x]), S != null))
@@ -4852,10 +4321,7 @@ var jd = an((_c) => {
case "suppressHydrationWarning":
break;
default:
- vd(x) &&
- typeof S != "function" &&
- typeof S != "symbol" &&
- e.push(sn, x, fa, Ae(S), no);
+ vd(x) && typeof S != "function" && typeof S != "symbol" && e.push(sn, x, fa, Ae(S), no);
}
return e.push(un), ns(e, m, c), c;
}
@@ -4876,10 +4342,7 @@ var jd = an((_c) => {
A(' data-stck="');
var kh = A("></template>");
function Kf(e, n, i) {
- if ((L(e, gh), i === null))
- throw Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ if ((L(e, gh), i === null)) throw Error("An ID must have been assigned before we can complete the boundary.");
return L(e, i), se(e, mh);
}
var Th = A('<div hidden id="'),
@@ -4946,19 +4409,19 @@ var jd = an((_c) => {
}
}
var Gh = A(
- 'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'
+ 'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("',
),
Xh = A('$RS("'),
Zh = A('","'),
Jh = A('")</script>'),
Qh = A(
- 'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'
+ 'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("',
),
Kh = A('$RC("'),
qh = A('","'),
ev = A('")</script>'),
tv = A(
- 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'
+ 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("',
),
rv = A('$RX("'),
nv = A('"'),
@@ -4976,7 +4439,7 @@ var jd = an((_c) => {
return "\\u2029";
default:
throw Error(
- "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
+ "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React",
);
}
});
@@ -5027,15 +4490,11 @@ var jd = an((_c) => {
var n = e.render;
return (
(e = e.displayName),
- e ||
- ((e = n.displayName || n.name || ""),
- (e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef")),
+ e || ((e = n.displayName || n.name || ""), (e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef")),
e
);
case Ed:
- return (
- (n = e.displayName || null), n !== null ? n : gc(e.type) || "Memo"
- );
+ return (n = e.displayName || null), n !== null ? n : gc(e.type) || "Memo";
case kc:
(n = e._payload), (e = e._init);
try {
@@ -5058,24 +4517,16 @@ var jd = an((_c) => {
(e.context._currentValue = e.parentValue), (e = e.parent);
var i = n.parent;
if (e === null) {
- if (i !== null)
- throw Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (i !== null) throw Error("The stacks must reach the root at the same time. This is a bug in React.");
} else {
- if (i === null)
- throw Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (i === null) throw Error("The stacks must reach the root at the same time. This is a bug in React.");
ds(e, i);
}
n.context._currentValue = n.value;
}
}
function Id(e) {
- (e.context._currentValue = e.parentValue),
- (e = e.parent),
- e !== null && Id(e);
+ (e.context._currentValue = e.parentValue), (e = e.parent), e !== null && Id(e);
}
function _d(e) {
var n = e.parent;
@@ -5083,19 +4534,14 @@ var jd = an((_c) => {
}
function Pd(e, n) {
if (((e.context._currentValue = e.parentValue), (e = e.parent), e === null))
- throw Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
+ throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
e.depth === n.depth ? ds(e, n) : Pd(e, n);
}
function Fd(e, n) {
var i = n.parent;
if (i === null)
- throw Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
- e.depth === i.depth ? ds(e, i) : Fd(e, i),
- (n.context._currentValue = n.value);
+ throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
+ e.depth === i.depth ? ds(e, i) : Fd(e, i), (n.context._currentValue = n.value);
}
function ls(e) {
var n = ao;
@@ -5132,35 +4578,21 @@ var jd = an((_c) => {
if (
((e.context = typeof m == "object" && m !== null ? m._currentValue : s),
(m = n.getDerivedStateFromProps),
- typeof m == "function" &&
- ((m = m(i, v)), (v = m == null ? v : Hi({}, v, m)), (e.state = v)),
+ typeof m == "function" && ((m = m(i, v)), (v = m == null ? v : Hi({}, v, m)), (e.state = v)),
typeof n.getDerivedStateFromProps != "function" &&
typeof e.getSnapshotBeforeUpdate != "function" &&
- (typeof e.UNSAFE_componentWillMount == "function" ||
- typeof e.componentWillMount == "function"))
+ (typeof e.UNSAFE_componentWillMount == "function" || typeof e.componentWillMount == "function"))
)
if (
((n = e.state),
typeof e.componentWillMount == "function" && e.componentWillMount(),
- typeof e.UNSAFE_componentWillMount == "function" &&
- e.UNSAFE_componentWillMount(),
+ typeof e.UNSAFE_componentWillMount == "function" && e.UNSAFE_componentWillMount(),
n !== e.state && td.enqueueReplaceState(e, e.state, null),
c.queue !== null && 0 < c.queue.length)
)
- if (
- ((n = c.queue),
- (m = c.replace),
- (c.queue = null),
- (c.replace = !1),
- m && n.length === 1)
- )
- e.state = n[0];
+ if (((n = c.queue), (m = c.replace), (c.queue = null), (c.replace = !1), m && n.length === 1)) e.state = n[0];
else {
- for (
- c = m ? n[0] : e.state, v = !0, m = m ? 1 : 0;
- m < n.length;
- m++
- ) {
+ for (c = m ? n[0] : e.state, v = !0, m = m ? 1 : 0; m < n.length; m++) {
var S = n[m];
(S = typeof S == "function" ? S.call(e, c, i, s) : S),
S != null && (v ? ((v = !1), (c = Hi({}, c, S))) : Hi(c, S));
@@ -5216,8 +4648,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return Cr;
}
function nd() {
- if (0 < ps)
- throw Error("Rendered more hooks than during the previous render");
+ if (0 < ps) throw Error("Rendered more hooks than during the previous render");
return { memoizedState: null, queue: null, next: null };
}
function Cc() {
@@ -5250,14 +4681,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return [ae.memoizedState, n];
}
return (
- (e =
- e === Ad
- ? typeof n == "function"
- ? n()
- : n
- : i !== void 0
- ? i(n)
- : n),
+ (e = e === Ad ? (typeof n == "function" ? n() : n) : i !== void 0 ? i(n) : n),
(ae.memoizedState = e),
(e = ae.queue = { last: null, dispatch: null }),
(e = e.dispatch = mv.bind(null, Cr, e)),
@@ -5265,9 +4689,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
);
}
function ad(e, n) {
- if (
- ((Cr = oo()), (ae = Cc()), (n = n === void 0 ? null : n), ae !== null)
- ) {
+ if (((Cr = oo()), (ae = Cc()), (n = n === void 0 ? null : n), ae !== null)) {
var i = ae.memoizedState;
if (i !== null && n !== null) {
var s = i[1];
@@ -5286,18 +4708,9 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return (e = e()), (ae.memoizedState = [e, n]), e;
}
function mv(e, n, i) {
- if (25 <= ps)
- throw Error(
- "Too many re-renders. React limits the number of renders to prevent an infinite loop."
- );
+ if (25 <= ps) throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
if (e === Cr)
- if (
- ((ss = !0),
- (e = { action: i, next: null }),
- cn === null && (cn = new Map()),
- (i = cn.get(n)),
- i === void 0)
- )
+ if (((ss = !0), (e = { action: i, next: null }), cn === null && (cn = new Map()), (i = cn.get(n)), i === void 0))
cn.set(n, e);
else {
for (n = i; n.next !== null; ) n = n.next;
@@ -5347,15 +4760,8 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(e = e.id), (e = (e & ~(1 << (32 - os(e) - 1))).toString(32) + n);
var i = is;
if (i === null)
- throw Error(
- "Invalid hook call. Hooks can only be called inside of the body of a function component."
- );
- return (
- (n = Wi++),
- (e = ":" + i.idPrefix + "R" + e),
- 0 < n && (e += "H" + n.toString(32)),
- e + ":"
- );
+ throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");
+ return (n = Wi++), (e = ":" + i.idPrefix + "R" + e), 0 < n && (e += "H" + n.toString(32)), e + ":";
},
useMutableSource: function (e, n) {
return oo(), n(e._source);
@@ -5363,15 +4769,13 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
useSyncExternalStore: function (e, n, i) {
if (i === void 0)
throw Error(
- "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
+ "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.",
);
return i();
},
},
is = null,
- hc =
- hd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .ReactCurrentDispatcher;
+ hc = hd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
function bv(e) {
return console.error(e), null;
}
@@ -5419,7 +4823,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
throw Error(
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' +
typeof e +
- '" instead'
+ '" instead',
);
return e;
}
@@ -5428,13 +4832,10 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
i(n),
(i = e.onFatalError),
i(n),
- e.destination !== null
- ? ((e.status = 2), e.destination.destroy(n))
- : ((e.status = 1), (e.fatalError = n));
+ e.destination !== null ? ((e.status = 2), e.destination.destroy(n)) : ((e.status = 1), (e.fatalError = n));
}
function ld(e, n, i, s, v) {
- for (Cr = {}, Tc = n, Wi = 0, e = i(s, v); ss; )
- (ss = !1), (Wi = 0), (ps += 1), (ae = null), (e = i(s, v));
+ for (Cr = {}, Tc = n, Wi = 0, e = i(s, v); ss; ) (ss = !1), (Wi = 0), (ps += 1), (ae = null), (e = i(s, v));
return Ec(), e;
}
function sd(e, n, i, s) {
@@ -5448,10 +4849,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
for (var S in i)
if (!(S in c))
throw Error(
- (gc(s) || "Unknown") +
- '.getChildContext(): key "' +
- S +
- '" is not defined in childContextTypes.'
+ (gc(s) || "Unknown") + '.getChildContext(): key "' + S + '" is not defined in childContextTypes.',
);
s = Hi({}, m, i);
}
@@ -5471,21 +4869,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
if (i.prototype && i.prototype.isReactComponent) {
v = ed(i, n.legacyContext);
var c = i.contextType;
- (c = new i(
- s,
- typeof c == "object" && c !== null ? c._currentValue : v
- )),
- rd(c, i, s, v),
- sd(e, n, c, i);
+ (c = new i(s, typeof c == "object" && c !== null ? c._currentValue : v)), rd(c, i, s, v), sd(e, n, c, i);
} else {
(c = ed(i, n.legacyContext)), (v = ld(e, n, i, s, c));
var m = Wi !== 0;
- if (
- typeof v == "object" &&
- v !== null &&
- typeof v.render == "function" &&
- v.$$typeof === void 0
- )
+ if (typeof v == "object" && v !== null && typeof v.render == "function" && v.$$typeof === void 0)
rd(v, i, s, c), sd(e, n, v, i);
else if (m) {
(s = n.treeContext), (n.treeContext = mc(s, 1, 0));
@@ -5543,11 +4931,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
throw Error("ReactDOMServer does not yet support scope components.");
case Td:
e: {
- (i = n.blockedBoundary),
- (v = n.blockedSegment),
- (c = s.fallback),
- (s = s.children),
- (m = new Set());
+ (i = n.blockedBoundary), (v = n.blockedSegment), (c = s.fallback), (s = s.children), (m = new Set());
var S = {
id: null,
rootSegmentID: -1,
@@ -5562,9 +4946,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
E = us(e, v.chunks.length, S, v.formatContext, !1, !1);
v.children.push(E), (v.lastPushedText = !1);
var x = us(e, 0, null, v.formatContext, !1, !1);
- (x.parentFlushed = !0),
- (n.blockedBoundary = S),
- (n.blockedSegment = x);
+ (x.parentFlushed = !0), (n.blockedBoundary = S), (n.blockedSegment = x);
try {
if (
(bc(e, n, s),
@@ -5575,14 +4957,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
)
break e;
} catch (R) {
- (x.status = 4),
- (S.forceClientRender = !0),
- (S.errorDigest = zi(e, R));
+ (x.status = 4), (S.forceClientRender = !0), (S.errorDigest = zi(e, R));
} finally {
(n.blockedBoundary = i), (n.blockedSegment = v);
}
- (n = Rc(e, c, i, E, m, n.legacyContext, n.context, n.treeContext)),
- e.pingedTasks.push(n);
+ (n = Rc(e, c, i, E, m, n.legacyContext, n.context, n.treeContext)), e.pingedTasks.push(n);
}
return;
}
@@ -5622,12 +5001,9 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(e = ao),
e === null)
)
- throw Error(
- "Tried to pop a Context at the root of the app. This is a bug in React."
- );
+ throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");
(s = e.parentValue),
- (e.context._currentValue =
- s === cv ? e.context._defaultValue : s),
+ (e.context._currentValue = s === cv ? e.context._defaultValue : s),
(e = ao = e.parent),
(n.context = e);
return;
@@ -5635,15 +5011,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(s = s.children), (s = s(i._currentValue)), ut(e, n, s);
return;
case kc:
- (v = i._init),
- (i = v(i._payload)),
- (s = ud(i, s)),
- yc(e, n, i, s, void 0);
+ (v = i._init), (i = v(i._payload)), (s = ud(i, s)), yc(e, n, i, s, void 0);
return;
}
throw Error(
"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
- ((i == null ? i : typeof i) + ".")
+ ((i == null ? i : typeof i) + "."),
);
}
}
@@ -5655,7 +5028,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return;
case md:
throw Error(
- "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
+ "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.",
);
case kc:
var s = i._init;
@@ -5669,8 +5042,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
if (
(i === null || typeof i != "object"
? (s = null)
- : ((s = (qf && i[qf]) || i["@@iterator"]),
- (s = typeof s == "function" ? s : null)),
+ : ((s = (qf && i[qf]) || i["@@iterator"]), (s = typeof s == "function" ? s : null)),
s && (s = s.call(i)))
) {
if (((i = s.next()), !i.done)) {
@@ -5685,29 +5057,16 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
((e = Object.prototype.toString.call(i)),
Error(
"Objects are not valid as a React child (found: " +
- (e === "[object Object]"
- ? "object with keys {" + Object.keys(i).join(", ") + "}"
- : e) +
- "). If you meant to render a collection of children, use an array instead."
+ (e === "[object Object]" ? "object with keys {" + Object.keys(i).join(", ") + "}" : e) +
+ "). If you meant to render a collection of children, use an array instead.",
))
);
}
typeof i == "string"
- ? ((s = n.blockedSegment),
- (s.lastPushedText = Yf(
- n.blockedSegment.chunks,
- i,
- e.responseState,
- s.lastPushedText
- )))
+ ? ((s = n.blockedSegment), (s.lastPushedText = Yf(n.blockedSegment.chunks, i, e.responseState, s.lastPushedText)))
: typeof i == "number" &&
((s = n.blockedSegment),
- (s.lastPushedText = Yf(
- n.blockedSegment.chunks,
- "" + i,
- e.responseState,
- s.lastPushedText
- )));
+ (s.lastPushedText = Yf(n.blockedSegment.chunks, "" + i, e.responseState, s.lastPushedText)));
}
function cd(e, n, i) {
for (var s = i.length, v = 0; v < s; v++) {
@@ -5727,45 +5086,19 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
try {
return ut(e, n, i);
} catch (E) {
- if (
- (Ec(),
- typeof E == "object" && E !== null && typeof E.then == "function")
- ) {
+ if ((Ec(), typeof E == "object" && E !== null && typeof E.then == "function")) {
i = E;
var m = n.blockedSegment,
- S = us(
- e,
- m.chunks.length,
- null,
- m.formatContext,
- m.lastPushedText,
- !0
- );
+ S = us(e, m.chunks.length, null, m.formatContext, m.lastPushedText, !0);
m.children.push(S),
(m.lastPushedText = !1),
- (e = Rc(
- e,
- n.node,
- n.blockedBoundary,
- S,
- n.abortSet,
- n.legacyContext,
- n.context,
- n.treeContext
- ).ping),
+ (e = Rc(e, n.node, n.blockedBoundary, S, n.abortSet, n.legacyContext, n.context, n.treeContext).ping),
i.then(e, e),
(n.blockedSegment.formatContext = s),
(n.legacyContext = v),
(n.context = c),
ls(c);
- } else
- throw (
- ((n.blockedSegment.formatContext = s),
- (n.legacyContext = v),
- (n.context = c),
- ls(c),
- E)
- );
+ } else throw ((n.blockedSegment.formatContext = s), (n.legacyContext = v), (n.context = c), ls(c), E);
}
}
function wv(e) {
@@ -5776,18 +5109,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
var s = e.blockedBoundary;
(e.blockedSegment.status = 3),
s === null
- ? (n.allPendingTasks--,
- n.status !== 2 &&
- ((n.status = 2), n.destination !== null && n.destination.end()))
+ ? (n.allPendingTasks--, n.status !== 2 && ((n.status = 2), n.destination !== null && n.destination.end()))
: (s.pendingTasks--,
s.forceClientRender ||
((s.forceClientRender = !0),
(s.errorDigest = n.onError(
- i === void 0
- ? Error(
- "The render was aborted by the server without a reason."
- )
- : i
+ i === void 0 ? Error("The render was aborted by the server without a reason.") : i,
)),
s.parentFlushed && n.clientRenderedBoundaries.push(s)),
s.fallbackAbortableTasks.forEach(function (v) {
@@ -5798,11 +5125,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
n.allPendingTasks === 0 && ((e = n.onAllReady), e()));
}
function fs(e, n) {
- if (
- n.chunks.length === 0 &&
- n.children.length === 1 &&
- n.children[0].boundary === null
- ) {
+ if (n.chunks.length === 0 && n.children.length === 1 && n.children[0].boundary === null) {
var i = n.children[0];
(i.id = n.id), (i.parentFlushed = !0), i.status === 1 && fs(e, i);
} else e.completedSegments.push(n);
@@ -5810,15 +5133,10 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
function Od(e, n, i) {
if (n === null) {
if (i.parentFlushed) {
- if (e.completedRootSegment !== null)
- throw Error(
- "There can only be one root segment. This is a bug in React."
- );
+ if (e.completedRootSegment !== null) throw Error("There can only be one root segment. This is a bug in React.");
e.completedRootSegment = i;
}
- e.pendingRootTasks--,
- e.pendingRootTasks === 0 &&
- ((e.onShellError = ji), (n = e.onShellReady), n());
+ e.pendingRootTasks--, e.pendingRootTasks === 0 && ((e.onShellError = ji), (n = e.onShellReady), n());
} else
n.pendingTasks--,
n.forceClientRender ||
@@ -5829,10 +5147,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
n.fallbackAbortableTasks.clear())
: i.parentFlushed &&
i.status === 1 &&
- (fs(n, i),
- n.completedSegments.length === 1 &&
- n.parentFlushed &&
- e.partialBoundaries.push(n)));
+ (fs(n, i), n.completedSegments.length === 1 && n.parentFlushed && e.partialBoundaries.push(n)));
e.allPendingTasks--, e.allPendingTasks === 0 && ((e = e.onAllReady), e());
}
function Md(e) {
@@ -5858,12 +5173,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
(E.status = 1),
Od(S, m.blockedBoundary, E);
} catch (J) {
- if (
- (Ec(),
- typeof J == "object" &&
- J !== null &&
- typeof J.then == "function")
- ) {
+ if ((Ec(), typeof J == "object" && J !== null && typeof J.then == "function")) {
var x = m.ping;
J.then(x, x);
} else {
@@ -5926,7 +5236,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return c < s.length && (v = se(n, s[c])), v;
default:
throw Error(
- "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
+ "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.",
);
}
}
@@ -5934,85 +5244,51 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
var s = i.boundary;
if (s === null) return es(e, n, i);
if (((s.parentFlushed = !0), s.forceClientRender))
- (s = s.errorDigest),
- se(n, yh),
- L(n, Sh),
- s && (L(n, xh), L(n, Ae(s)), L(n, wh)),
- se(n, kh),
- es(e, n, i);
+ (s = s.errorDigest), se(n, yh), L(n, Sh), s && (L(n, xh), L(n, Ae(s)), L(n, wh)), se(n, kh), es(e, n, i);
else if (0 < s.pendingTasks) {
- (s.rootSegmentID = e.nextSegmentId++),
- 0 < s.completedSegments.length && e.partialBoundaries.push(s);
+ (s.rootSegmentID = e.nextSegmentId++), 0 < s.completedSegments.length && e.partialBoundaries.push(s);
var v = e.responseState,
c = v.nextSuspenseID++;
- (v = A(v.boundaryPrefix + c.toString(16))),
- (s = s.id = v),
- Kf(n, e.responseState, s),
- es(e, n, i);
+ (v = A(v.boundaryPrefix + c.toString(16))), (s = s.id = v), Kf(n, e.responseState, s), es(e, n, i);
} else if (s.byteSize > e.progressiveChunkSize)
- (s.rootSegmentID = e.nextSegmentId++),
- e.completedBoundaries.push(s),
- Kf(n, e.responseState, s.id),
- es(e, n, i);
+ (s.rootSegmentID = e.nextSegmentId++), e.completedBoundaries.push(s), Kf(n, e.responseState, s.id), es(e, n, i);
else {
if ((se(n, vh), (i = s.completedSegments), i.length !== 1))
- throw Error(
- "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
- );
+ throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
hs(e, n, i[0]);
}
return se(n, bh);
}
function fd(e, n, i) {
- return (
- Vh(n, e.responseState, i.formatContext, i.id),
- hs(e, n, i),
- Yh(n, i.formatContext)
- );
+ return Vh(n, e.responseState, i.formatContext, i.id), hs(e, n, i), Yh(n, i.formatContext);
}
function dd(e, n, i) {
- for (var s = i.completedSegments, v = 0; v < s.length; v++)
- Ld(e, n, i, s[v]);
+ for (var s = i.completedSegments, v = 0; v < s.length; v++) Ld(e, n, i, s[v]);
if (
((s.length = 0),
(e = e.responseState),
(s = i.id),
(i = i.rootSegmentID),
L(n, e.startInlineScript),
- e.sentCompleteBoundaryFunction
- ? L(n, Kh)
- : ((e.sentCompleteBoundaryFunction = !0), L(n, Qh)),
+ e.sentCompleteBoundaryFunction ? L(n, Kh) : ((e.sentCompleteBoundaryFunction = !0), L(n, Qh)),
s === null)
)
- throw Error(
- "An ID must have been assigned before we can complete the boundary."
- );
- return (
- (i = i.toString(16)),
- L(n, s),
- L(n, qh),
- L(n, e.segmentPrefix),
- L(n, i),
- se(n, ev)
- );
+ throw Error("An ID must have been assigned before we can complete the boundary.");
+ return (i = i.toString(16)), L(n, s), L(n, qh), L(n, e.segmentPrefix), L(n, i), se(n, ev);
}
function Ld(e, n, i, s) {
if (s.status === 2) return !0;
var v = s.id;
if (v === -1) {
if ((s.id = i.rootSegmentID) === -1)
- throw Error(
- "A root segment ID must have been assigned by now. This is a bug in React."
- );
+ throw Error("A root segment ID must have been assigned by now. This is a bug in React.");
return fd(e, n, s);
}
return (
fd(e, n, s),
(e = e.responseState),
L(n, e.startInlineScript),
- e.sentCompleteSegmentFunction
- ? L(n, Xh)
- : ((e.sentCompleteSegmentFunction = !0), L(n, Gh)),
+ e.sentCompleteSegmentFunction ? L(n, Xh) : ((e.sentCompleteSegmentFunction = !0), L(n, Gh)),
L(n, e.segmentPrefix),
(v = v.toString(16)),
L(n, v),
@@ -6044,14 +5320,10 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
D = m.errorComponentStack;
if (
(L(s, S.startInlineScript),
- S.sentClientRenderFunction
- ? L(s, rv)
- : ((S.sentClientRenderFunction = !0), L(s, tv)),
+ S.sentClientRenderFunction ? L(s, rv) : ((S.sentClientRenderFunction = !0), L(s, tv)),
E === null)
)
- throw Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw Error("An ID must have been assigned before we can complete the boundary.");
if (
(L(s, E),
L(s, nv),
@@ -6153,8 +5425,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
v = n ? n.bootstrapScriptContent : void 0,
c = n ? n.bootstrapScripts : void 0,
m = n ? n.bootstrapModules : void 0;
- (i = i === void 0 ? "" : i),
- (s = s === void 0 ? Kp : A('<script nonce="' + Ae(s) + '">'));
+ (i = i === void 0 ? "" : i), (s = s === void 0 ? Kp : A('<script nonce="' + Ae(s) + '">'));
var S = [];
if ((v !== void 0 && S.push(s, ("" + v).replace(rh, nh), qp), c !== void 0))
for (v = 0; v < c.length; v++) S.push(eh, Ae(c[v]), Vf);
@@ -6172,14 +5443,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
sentClientRenderFunction: !1,
}),
(c = n ? n.namespaceURI : void 0),
- (c = Qt(
- c === "http://www.w3.org/2000/svg"
- ? 2
- : c === "http://www.w3.org/1998/Math/MathML"
- ? 3
- : 0,
- null
- )),
+ (c = Qt(c === "http://www.w3.org/2000/svg" ? 2 : c === "http://www.w3.org/1998/Math/MathML" ? 3 : 0, null)),
(v = n ? n.progressiveChunkSize : void 0),
(s = n ? n.onError : void 0),
(S = n ? n.onAllReady : void 0);
@@ -6223,18 +5487,12 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
xv(i),
{
pipe: function (v) {
- if (s)
- throw Error(
- "React currently only supports piping to one writable stream."
- );
+ if (s) throw Error("React currently only supports piping to one writable stream.");
return (
(s = !0),
Bd(i, v),
v.on("drain", kv(v, i)),
- v.on(
- "error",
- pd(i, Error("The destination stream errored while writing data."))
- ),
+ v.on("error", pd(i, Error("The destination stream errored while writing data."))),
v.on("close", pd(i, Error("The destination stream closed early."))),
v
);
@@ -6247,7 +5505,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
};
_c.version = "18.2.0";
});
-var Hd = an((pa) => {
+var Hd = an(pa => {
"use strict";
process.env.NODE_ENV !== "production" &&
(function () {
@@ -6258,23 +5516,13 @@ var Hd = an((pa) => {
s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function v(t) {
{
- for (
- var r = arguments.length, l = new Array(r > 1 ? r - 1 : 0), u = 1;
- u < r;
- u++
- )
- l[u - 1] = arguments[u];
+ for (var r = arguments.length, l = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++) l[u - 1] = arguments[u];
m("warn", t, l);
}
}
function c(t) {
{
- for (
- var r = arguments.length, l = new Array(r > 1 ? r - 1 : 0), u = 1;
- u < r;
- u++
- )
- l[u - 1] = arguments[u];
+ for (var r = arguments.length, l = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++) l[u - 1] = arguments[u];
m("error", t, l);
}
}
@@ -6286,8 +5534,7 @@ var Hd = an((pa) => {
var g = l.map(function (y) {
return String(y);
});
- g.unshift("Warning: " + r),
- Function.prototype.apply.call(console[t], console, g);
+ g.unshift("Warning: " + r), Function.prototype.apply.call(console[t], console, g);
}
}
function S(t) {
@@ -6336,7 +5583,7 @@ var Hd = an((pa) => {
c(
"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",
r,
- P(t)
+ P(t),
),
W(t)
);
@@ -6347,7 +5594,7 @@ var Hd = an((pa) => {
c(
"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",
r,
- P(t)
+ P(t),
),
W(t)
);
@@ -6357,7 +5604,7 @@ var Hd = an((pa) => {
return (
c(
"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",
- P(t)
+ P(t),
),
W(t)
);
@@ -6438,17 +5685,10 @@ var Hd = an((pa) => {
l = t[1];
ce[r] = new re(r, ct, !1, l, null, !1, !1);
}),
- ["contentEditable", "draggable", "spellCheck", "value"].forEach(
- function (t) {
- ce[t] = new re(t, qt, !1, t.toLowerCase(), null, !1, !1);
- }
- ),
- [
- "autoReverse",
- "externalResourcesRequired",
- "focusable",
- "preserveAlpha",
- ].forEach(function (t) {
+ ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (t) {
+ ce[t] = new re(t, qt, !1, t.toLowerCase(), null, !1, !1);
+ }),
+ ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function (t) {
ce[t] = new re(t, qt, !1, t, null, !1, !1);
}),
[
@@ -6572,42 +5812,21 @@ var Hd = an((pa) => {
var r = t.replace(rr, nr);
ce[r] = new re(r, ct, !1, t, null, !1, !1);
}),
- [
- "xlink:actuate",
- "xlink:arcrole",
- "xlink:role",
- "xlink:show",
- "xlink:title",
- "xlink:type",
- ].forEach(function (t) {
+ ["xlink:actuate", "xlink:arcrole", "xlink:role", "xlink:show", "xlink:title", "xlink:type"].forEach(function (
+ t,
+ ) {
var r = t.replace(rr, nr);
ce[r] = new re(r, ct, !1, t, "http://www.w3.org/1999/xlink", !1, !1);
}),
["xml:base", "xml:lang", "xml:space"].forEach(function (t) {
var r = t.replace(rr, nr);
- ce[r] = new re(
- r,
- ct,
- !1,
- t,
- "http://www.w3.org/XML/1998/namespace",
- !1,
- !1
- );
+ ce[r] = new re(r, ct, !1, t, "http://www.w3.org/XML/1998/namespace", !1, !1);
}),
["tabIndex", "crossOrigin"].forEach(function (t) {
ce[t] = new re(t, ct, !1, t.toLowerCase(), null, !1, !1);
});
var Rr = "xlinkHref";
- (ce[Rr] = new re(
- "xlinkHref",
- ct,
- !1,
- "xlink:href",
- "http://www.w3.org/1999/xlink",
- !0,
- !1
- )),
+ (ce[Rr] = new re("xlinkHref", ct, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1)),
["src", "href", "action", "formAction"].forEach(function (t) {
ce[t] = new re(t, ct, !1, t.toLowerCase(), null, !0, !0);
});
@@ -6682,14 +5901,14 @@ var Hd = an((pa) => {
r.disabled ||
r.value == null ||
c(
- "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
+ "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.",
),
r.onChange ||
r.readOnly ||
r.disabled ||
r.checked == null ||
c(
- "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
+ "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.",
);
}
function co(t, r) {
@@ -6770,30 +5989,17 @@ var Hd = an((pa) => {
u = or.hasOwnProperty(l) ? l : null;
if (u == null)
return (
- c(
- "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
- r
- ),
- (je[r] = !0),
- !0
- );
- if (r !== u)
- return (
- c("Invalid ARIA attribute `%s`. Did you mean `%s`?", r, u),
+ c("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", r),
(je[r] = !0),
!0
);
+ if (r !== u) return c("Invalid ARIA attribute `%s`. Did you mean `%s`?", r, u), (je[r] = !0), !0;
}
if (ha.test(r)) {
var p = r.toLowerCase(),
g = or.hasOwnProperty(p) ? p : null;
if (g == null) return (je[r] = !0), !1;
- if (r !== g)
- return (
- c("Unknown ARIA attribute `%s`. Did you mean `%s`?", r, g),
- (je[r] = !0),
- !0
- );
+ if (r !== g) return c("Unknown ARIA attribute `%s`. Did you mean `%s`?", r, g), (je[r] = !0), !0;
}
}
return !0;
@@ -6811,16 +6017,12 @@ var Hd = an((pa) => {
})
.join(", ");
l.length === 1
- ? c(
- "Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",
- g,
- t
- )
+ ? c("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", g, t)
: l.length > 1 &&
c(
"Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",
g,
- t
+ t,
);
}
}
@@ -6838,11 +6040,11 @@ var Hd = an((pa) => {
t === "select" && r.multiple
? c(
"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",
- t
+ t,
)
: c(
"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
- t
+ t,
));
}
}
@@ -7346,7 +6548,7 @@ var Hd = an((pa) => {
if (p === "onfocusin" || p === "onfocusout")
return (
c(
- "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."
+ "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.",
),
(ke[r] = !0),
!0
@@ -7356,31 +6558,14 @@ var Hd = an((pa) => {
y = u.possibleRegistrationNames;
if (g.hasOwnProperty(r)) return !0;
var w = y.hasOwnProperty(p) ? y[p] : null;
- if (w != null)
- return (
- c(
- "Invalid event handler property `%s`. Did you mean `%s`?",
- r,
- w
- ),
- (ke[r] = !0),
- !0
- );
- if (po.test(r))
- return (
- c(
- "Unknown event handler property `%s`. It will be ignored.",
- r
- ),
- (ke[r] = !0),
- !0
- );
+ if (w != null) return c("Invalid event handler property `%s`. Did you mean `%s`?", r, w), (ke[r] = !0), !0;
+ if (po.test(r)) return c("Unknown event handler property `%s`. It will be ignored.", r), (ke[r] = !0), !0;
} else if (po.test(r))
return (
va.test(r) &&
c(
"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
- r
+ r,
),
(ke[r] = !0),
!0
@@ -7389,7 +6574,7 @@ var Hd = an((pa) => {
if (p === "innerhtml")
return (
c(
- "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
+ "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.",
),
(ke[r] = !0),
!0
@@ -7397,7 +6582,7 @@ var Hd = an((pa) => {
if (p === "aria")
return (
c(
- "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
+ "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.",
),
(ke[r] = !0),
!0
@@ -7406,17 +6591,14 @@ var Hd = an((pa) => {
return (
c(
"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
- typeof l
+ typeof l,
),
(ke[r] = !0),
!0
);
if (typeof l == "number" && isNaN(l))
return (
- c(
- "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
- r
- ),
+ c("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.", r),
(ke[r] = !0),
!0
);
@@ -7424,18 +6606,13 @@ var Hd = an((pa) => {
_ = C !== null && C.type === F;
if (sr.hasOwnProperty(p)) {
var O = sr[p];
- if (O !== r)
- return (
- c("Invalid DOM property `%s`. Did you mean `%s`?", r, O),
- (ke[r] = !0),
- !0
- );
+ if (O !== r) return c("Invalid DOM property `%s`. Did you mean `%s`?", r, O), (ke[r] = !0), !0;
} else if (!_ && r !== p)
return (
c(
"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",
r,
- p
+ p,
),
(ke[r] = !0),
!0
@@ -7448,7 +6625,7 @@ var Hd = an((pa) => {
r,
r,
l,
- r
+ r,
)
: c(
'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',
@@ -7458,7 +6635,7 @@ var Hd = an((pa) => {
l,
r,
r,
- r
+ r,
),
(ke[r] = !0),
!0)
@@ -7477,7 +6654,7 @@ var Hd = an((pa) => {
? "The browser will interpret it as a truthy value."
: 'Although this works, it will not work as expected if you pass the string "false".',
r,
- l
+ l,
),
(ke[r] = !0)),
!0);
@@ -7499,13 +6676,13 @@ var Hd = an((pa) => {
? c(
"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",
y,
- t
+ t,
)
: u.length > 1 &&
c(
"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",
y,
- t
+ t,
);
}
};
@@ -7529,12 +6706,7 @@ var Hd = an((pa) => {
},
_r = function (t) {
(xt.hasOwnProperty(t) && xt[t]) ||
- ((xt[t] = !0),
- c(
- "Unsupported style property %s. Did you mean %s?",
- t,
- ur(t.replace(Te, "ms-"))
- ));
+ ((xt[t] = !0), c("Unsupported style property %s. Did you mean %s?", t, ur(t.replace(Te, "ms-"))));
},
ya = function (t) {
(xt.hasOwnProperty(t) && xt[t]) ||
@@ -7542,42 +6714,23 @@ var Hd = an((pa) => {
c(
"Unsupported vendor-prefixed style property %s. Did you mean %s?",
t,
- t.charAt(0).toUpperCase() + t.slice(1)
+ t.charAt(0).toUpperCase() + t.slice(1),
));
},
ba = function (t, r) {
(hn.hasOwnProperty(r) && hn[r]) ||
((hn[r] = !0),
- c(
- `Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,
- t,
- r.replace(go, "")
- ));
+ c(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`, t, r.replace(go, "")));
},
mo = function (t, r) {
- vn ||
- ((vn = !0),
- c(
- "`NaN` is an invalid value for the `%s` css style property.",
- t
- ));
+ vn || ((vn = !0), c("`NaN` is an invalid value for the `%s` css style property.", t));
},
Ut = function (t, r) {
- Ir ||
- ((Ir = !0),
- c(
- "`Infinity` is an invalid value for the `%s` css style property.",
- t
- ));
+ Ir || ((Ir = !0), c("`Infinity` is an invalid value for the `%s` css style property.", t));
};
pn = function (t, r) {
- t.indexOf("-") > -1
- ? _r(t)
- : wt.test(t)
- ? ya(t)
- : go.test(r) && ba(t, r),
- typeof r == "number" &&
- (isNaN(r) ? mo(t, r) : isFinite(r) || Ut(t, r));
+ t.indexOf("-") > -1 ? _r(t) : wt.test(t) ? ya(t) : go.test(r) && ba(t, r),
+ typeof r == "number" && (isNaN(r) ? mo(t, r) : isFinite(r) || Ut(t, r));
};
}
var gn = pn,
@@ -7632,7 +6785,7 @@ var Hd = an((pa) => {
((mn = !0),
c(
"A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",
- JSON.stringify(t)
+ JSON.stringify(t),
));
}
var Ta = Array.isArray;
@@ -7657,8 +6810,7 @@ var Hd = an((pa) => {
w = [];
if ((l !== void 0 && w.push(y, So(l), Ca), u !== void 0))
for (var C = 0; C < u.length; C++) w.push(Ea, ge(u[C]), bo);
- if (p !== void 0)
- for (var _ = 0; _ < p.length; _++) w.push(Ra, ge(p[_]), bo);
+ if (p !== void 0) for (var _ = 0; _ < p.length; _++) w.push(Ra, ge(p[_]), bo);
return {
bootstrapChunks: w,
startInlineScript: y,
@@ -7704,9 +6856,7 @@ var Hd = an((pa) => {
case "tr":
return He(Tt, null);
}
- return t.insertionMode >= fr || t.insertionMode === Fr
- ? He(kt, null)
- : t;
+ return t.insertionMode >= fr || t.insertionMode === Fr ? He(kt, null) : t;
}
var Ct = null;
function Wt(t) {
@@ -7741,7 +6891,7 @@ var Hd = an((pa) => {
function wo(t, r, l) {
if (typeof l != "object")
throw new Error(
- "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
+ "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.",
);
var u = !0;
for (var p in l)
@@ -7782,13 +6932,7 @@ var Hd = an((pa) => {
case "suppressHydrationWarning":
return;
}
- if (
- !(
- l.length > 2 &&
- (l[0] === "o" || l[0] === "O") &&
- (l[1] === "n" || l[1] === "N")
- )
- ) {
+ if (!(l.length > 2 && (l[0] === "o" || l[0] === "O") && (l[1] === "n" || l[1] === "N"))) {
var p = er(l);
if (p !== null) {
switch (typeof u) {
@@ -7805,9 +6949,7 @@ var Hd = an((pa) => {
u && t.push(We, y, $t);
return;
case Mt:
- u === !0
- ? t.push(We, y, $t)
- : u === !1 || t.push(We, y, Rt, ge(u), ht);
+ u === !0 ? t.push(We, y, $t) : u === !1 || t.push(We, y, Rt, ge(u), ht);
return;
case Lt:
isNaN(u) || t.push(We, y, Rt, ge(u), ht);
@@ -7816,8 +6958,7 @@ var Hd = an((pa) => {
!isNaN(u) && u >= 1 && t.push(We, y, Rt, ge(u), ht);
break;
default:
- p.sanitizeURL && (q(u, g), (u = "" + u), yo(u)),
- t.push(We, y, Rt, ge(u), ht);
+ p.sanitizeURL && (q(u, g), (u = "" + u), yo(u)), t.push(We, y, Rt, ge(u), ht);
}
} else if (bt(l)) {
switch (typeof u) {
@@ -7837,13 +6978,10 @@ var Hd = an((pa) => {
pr = "/>";
function hr(t, r, l) {
if (r != null) {
- if (l != null)
- throw new Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (l != null) throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof r != "object" || !("__html" in r))
throw new Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
var u = r.__html;
u != null && (_e(u), t.push("" + u));
@@ -7862,16 +7000,10 @@ var Hd = an((pa) => {
if (l != null) {
var u = me(l);
t.multiple && !u
- ? c(
- "The `%s` prop supplied to <select> must be an array if `multiple` is true.",
- r
- )
+ ? c("The `%s` prop supplied to <select> must be an array if `multiple` is true.", r)
: !t.multiple &&
u &&
- c(
- "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",
- r
- );
+ c("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.", r);
}
}
}
@@ -7883,7 +7015,7 @@ var Hd = an((pa) => {
r.defaultValue !== void 0 &&
!Ze &&
(c(
- "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"
+ "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components",
),
(Ze = !0)),
t.push(Be("select"));
@@ -7921,7 +7053,7 @@ var Hd = an((pa) => {
typeof l != "number" &&
((vt = !0),
c(
- "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
+ "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.",
)));
}),
r
@@ -7947,7 +7079,7 @@ var Hd = an((pa) => {
(w = O),
Re ||
(c(
- "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
+ "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.",
),
(Re = !0));
break;
@@ -7970,7 +7102,7 @@ var Hd = an((pa) => {
(Ur ||
((Ur = !0),
c(
- "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
+ "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.",
))),
(j = gr(g))),
me(p))
@@ -7995,7 +7127,7 @@ var Hd = an((pa) => {
(c(
"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",
"A component",
- r.type
+ r.type,
),
(vr = !0)),
r.value !== void 0 &&
@@ -8004,7 +7136,7 @@ var Hd = an((pa) => {
(c(
"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",
"A component",
- r.type
+ r.type,
),
(It = !0)),
t.push(Be("input"));
@@ -8020,7 +7152,7 @@ var Hd = an((pa) => {
case "children":
case "dangerouslySetInnerHTML":
throw new Error(
- "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
case "defaultChecked":
y = C;
@@ -8040,12 +7172,8 @@ var Hd = an((pa) => {
}
}
return (
- g !== null
- ? Ce(t, l, "checked", g)
- : y !== null && Ce(t, l, "checked", y),
- u !== null
- ? Ce(t, l, "value", u)
- : p !== null && Ce(t, l, "value", p),
+ g !== null ? Ce(t, l, "checked", g) : y !== null && Ce(t, l, "checked", y),
+ u !== null ? Ce(t, l, "value", u) : p !== null && Ce(t, l, "value", p),
t.push(pr),
null
);
@@ -8056,7 +7184,7 @@ var Hd = an((pa) => {
r.defaultValue !== void 0 &&
!_t &&
(c(
- "Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"
+ "Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",
),
(_t = !0)),
t.push(Be("textarea"));
@@ -8078,27 +7206,17 @@ var Hd = an((pa) => {
p = w;
break;
case "dangerouslySetInnerHTML":
- throw new Error(
- "`dangerouslySetInnerHTML` does not make sense on <textarea>."
- );
+ throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
default:
Ce(t, l, y, w);
break;
}
}
if ((u === null && p !== null && (u = p), t.push(rt), g != null)) {
- if (
- (c(
- "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
- ),
- u != null)
- )
- throw new Error(
- "If you supply `defaultValue` on a <textarea>, do not pass children."
- );
+ if ((c("Use the `defaultValue` or `value` props instead of setting children on <textarea>."), u != null))
+ throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
if (me(g)) {
- if (g.length > 1)
- throw new Error("<textarea> can only have at most one child.");
+ if (g.length > 1) throw new Error("<textarea> can only have at most one child.");
_e(g[0]), (u = "" + g[0]);
}
_e(g), (u = "" + g);
@@ -8123,8 +7241,7 @@ var Hd = an((pa) => {
case "children":
case "dangerouslySetInnerHTML":
throw new Error(
- l +
- " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ l + " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
default:
Ce(t, u, p, g);
@@ -8142,9 +7259,7 @@ var Hd = an((pa) => {
switch (u) {
case "children":
case "dangerouslySetInnerHTML":
- throw new Error(
- "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
- );
+ throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");
default:
Ce(t, l, u, p);
break;
@@ -8164,9 +7279,7 @@ var Hd = an((pa) => {
u = g;
break;
case "dangerouslySetInnerHTML":
- throw new Error(
- "`dangerouslySetInnerHTML` does not make sense on <title>."
- );
+ throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");
default:
Ce(t, l, p, g);
break;
@@ -8177,17 +7290,17 @@ var Hd = an((pa) => {
var y = Array.isArray(u) && u.length < 2 ? u[0] || null : u;
Array.isArray(u) && u.length > 1
? c(
- "A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"
+ "A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering",
)
: y != null && y.$$typeof != null
? c(
- "A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"
+ "A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering",
)
: y != null &&
typeof y != "string" &&
typeof y != "number" &&
c(
- "A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"
+ "A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering",
);
}
return u;
@@ -8212,11 +7325,7 @@ var Hd = an((pa) => {
break;
}
}
- return (
- t.push(rt),
- hr(t, g, p),
- typeof p == "string" ? (t.push(Et(p)), null) : p
- );
+ return t.push(rt), hr(t, g, p), typeof p == "string" ? (t.push(Et(p)), null) : p;
}
function Pa(t, r, l, u) {
t.push(Be(l));
@@ -8240,10 +7349,7 @@ var Hd = an((pa) => {
case "suppressHydrationWarning":
break;
default:
- bt(y) &&
- typeof w != "function" &&
- typeof w != "symbol" &&
- t.push(We, y, Rt, ge(w), ht);
+ bt(y) && typeof w != "function" && typeof w != "symbol" && t.push(We, y, Rt, ge(w), ht);
break;
}
}
@@ -8272,13 +7378,10 @@ var Hd = an((pa) => {
}
}
if ((t.push(rt), g != null)) {
- if (p != null)
- throw new Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (p != null) throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof g != "object" || !("__html" in g))
throw new Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
var C = g.__html;
C != null &&
@@ -8319,7 +7422,7 @@ var Hd = an((pa) => {
l.contentEditable &&
l.children != null &&
c(
- "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."
+ "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.",
),
p.insertionMode !== Ar &&
p.insertionMode !== Dr &&
@@ -8328,7 +7431,7 @@ var Hd = an((pa) => {
r.toLowerCase() !== r &&
c(
"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
- r
+ r,
),
r)
) {
@@ -8374,9 +7477,7 @@ var Hd = an((pa) => {
case "html":
return p.insertionMode === Fr && t.push(En), Pt(t, l, r, u);
default:
- return r.indexOf("-") === -1 && typeof l.is != "string"
- ? Pt(t, l, r, u)
- : Pa(t, l, r, u);
+ return r.indexOf("-") === -1 && typeof l.is != "string" ? Pt(t, l, r, u) : Pa(t, l, r, u);
}
}
var Aa = "</",
@@ -8404,8 +7505,7 @@ var Hd = an((pa) => {
}
}
function _n(t, r) {
- for (var l = r.bootstrapChunks, u = 0; u < l.length - 1; u++)
- x(t, l[u]);
+ for (var l = r.bootstrapChunks, u = 0; u < l.length - 1; u++) x(t, l[u]);
return u < l.length ? R(t, l[u]) : !0;
}
var h = '<template id="',
@@ -8431,9 +7531,7 @@ var Hd = an((pa) => {
}
function yr(t, r, l) {
if ((x(t, I), l === null))
- throw new Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw new Error("An ID must have been assigned before we can complete the boundary.");
return x(t, l), R(t, U);
}
function Pn(t, r, l, u, p) {
@@ -8482,33 +7580,19 @@ var Hd = an((pa) => {
switch (l.insertionMode) {
case Fr:
case kt:
- return (
- x(t, Oa), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, Eo)
- );
+ return x(t, Oa), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, Eo);
case Ar:
- return (
- x(t, vs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, gs)
- );
+ return x(t, vs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, gs);
case Dr:
- return (
- x(t, ms), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, ys)
- );
+ return x(t, ms), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, ys);
case fr:
- return (
- x(t, bs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, Ss)
- );
+ return x(t, bs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, Ss);
case yn:
- return (
- x(t, xs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, ks)
- );
+ return x(t, xs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, ks);
case Tt:
- return (
- x(t, Cs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, Es)
- );
+ return x(t, Cs), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, Es);
case Or:
- return (
- x(t, Is), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, _s)
- );
+ return x(t, Is), x(t, r.segmentPrefix), x(t, u.toString(16)), R(t, _s);
default:
throw new Error("Unknown insertion mode. This is a bug in React.");
}
@@ -8546,9 +7630,7 @@ var Hd = an((pa) => {
js = '")</script>';
function Hs(t, r, l) {
x(t, r.startInlineScript),
- r.sentCompleteSegmentFunction
- ? x(t, Bs)
- : ((r.sentCompleteSegmentFunction = !0), x(t, Ls)),
+ r.sentCompleteSegmentFunction ? x(t, Bs) : ((r.sentCompleteSegmentFunction = !0), x(t, Ls)),
x(t, r.segmentPrefix);
var u = l.toString(16);
return x(t, u), x(t, Us), x(t, r.placeholderPrefix), x(t, u), R(t, js);
@@ -8560,14 +7642,10 @@ var Hd = an((pa) => {
function Vs(t, r, l, u) {
if (
(x(t, r.startInlineScript),
- r.sentCompleteBoundaryFunction
- ? x(t, zs)
- : ((r.sentCompleteBoundaryFunction = !0), x(t, Ws)),
+ r.sentCompleteBoundaryFunction ? x(t, zs) : ((r.sentCompleteBoundaryFunction = !0), x(t, Ws)),
l === null)
)
- throw new Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw new Error("An ID must have been assigned before we can complete the boundary.");
var p = u.toString(16);
return x(t, l), x(t, $s), x(t, r.segmentPrefix), x(t, p), R(t, Ns);
}
@@ -8579,14 +7657,10 @@ var Hd = an((pa) => {
function Js(t, r, l, u, p, g) {
if (
(x(t, r.startInlineScript),
- r.sentClientRenderFunction
- ? x(t, Gs)
- : ((r.sentClientRenderFunction = !0), x(t, Ys)),
+ r.sentClientRenderFunction ? x(t, Gs) : ((r.sentClientRenderFunction = !0), x(t, Ys)),
l === null)
)
- throw new Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw new Error("An ID must have been assigned before we can complete the boundary.");
return (
x(t, l),
x(t, Xs),
@@ -8609,7 +7683,7 @@ var Hd = an((pa) => {
return "\\u2029";
default:
throw new Error(
- "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
+ "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React",
);
}
});
@@ -8689,7 +7763,7 @@ var Hd = an((pa) => {
if (
(typeof t.tag == "number" &&
c(
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.",
),
typeof t == "function")
)
@@ -8788,10 +7862,7 @@ var Hd = an((pa) => {
groupEnd: Qe({}, t, { value: Ga }),
});
}
- Nr < 0 &&
- c(
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
- );
+ Nr < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var Za = s.ReactCurrentDispatcher,
@@ -8888,9 +7959,7 @@ var Hd = an((pa) => {
`
` + w[_].replace(" at new ", " at ");
return (
- t.displayName &&
- j.includes("<anonymous>") &&
- (j = j.replace("<anonymous>", t.displayName)),
+ t.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", t.displayName)),
typeof t == "function" && Nt.set(t, j),
j
);
@@ -8968,18 +8037,11 @@ var Hd = an((pa) => {
y +
"` is invalid; it must be a function, usually from the `prop-types` package, but received `" +
typeof t[y] +
- "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
+ "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.",
);
throw ((C.name = "Invariant Violation"), C);
}
- w = t[y](
- r,
- y,
- u,
- l,
- null,
- "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"
- );
+ w = t[y](r, y, u, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (_) {
w = _;
}
@@ -8991,15 +8053,12 @@ var Hd = an((pa) => {
u || "React class",
l,
y,
- typeof w
+ typeof w,
),
Ln(null)),
w instanceof Error &&
!(w.message in rl) &&
- ((rl[w.message] = !0),
- Ln(p),
- c("Failed %s type: %s", l, w.message),
- Ln(null));
+ ((rl[w.message] = !0), Ln(p), c("Failed %s type: %s", l, w.message), Ln(null));
}
}
}
@@ -9030,7 +8089,7 @@ var Hd = an((pa) => {
c(
"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",
p,
- p
+ p,
));
}
return l;
@@ -9039,10 +8098,7 @@ var Hd = an((pa) => {
for (var y in g)
if (!(y in u))
throw new Error(
- (ie(r) || "Unknown") +
- '.getChildContext(): key "' +
- y +
- '" is not defined in childContextTypes.'
+ (ie(r) || "Unknown") + '.getChildContext(): key "' + y + '" is not defined in childContextTypes.',
);
{
var w = ie(r) || "Unknown";
@@ -9067,15 +8123,9 @@ var Hd = an((pa) => {
var l = t.parent,
u = r.parent;
if (l === null) {
- if (u !== null)
- throw new Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (u !== null) throw new Error("The stacks must reach the root at the same time. This is a bug in React.");
} else {
- if (u === null)
- throw new Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (u === null) throw new Error("The stacks must reach the root at the same time. This is a bug in React.");
Zr(l, u);
}
Ft(r);
@@ -9094,17 +8144,13 @@ var Hd = an((pa) => {
qa(t);
var l = t.parent;
if (l === null)
- throw new Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
+ throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
l.depth === r.depth ? Zr(l, r) : ei(l, r);
}
function ti(t, r) {
var l = r.parent;
if (l === null)
- throw new Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
+ throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
t.depth === l.depth ? Zr(t, l) : ti(t, l), Ft(r);
}
function jn(t) {
@@ -9130,7 +8176,7 @@ var Hd = an((pa) => {
t._currentRenderer2 !== null &&
t._currentRenderer2 !== Xr &&
c(
- "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
+ "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.",
),
(t._currentRenderer2 = Xr);
var u = nt,
@@ -9145,24 +8191,16 @@ var Hd = an((pa) => {
}
function Lo(t) {
var r = nt;
- if (r === null)
- throw new Error(
- "Tried to pop a Context at the root of the app. This is a bug in React."
- );
- r.context !== t &&
- c(
- "The parent context is not the expected context. This is probably a bug in React."
- );
+ if (r === null) throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");
+ r.context !== t && c("The parent context is not the expected context. This is probably a bug in React.");
{
var l = r.parentValue;
- l === ru
- ? (r.context._currentValue2 = r.context._defaultValue)
- : (r.context._currentValue2 = l),
+ l === ru ? (r.context._currentValue2 = r.context._defaultValue) : (r.context._currentValue2 = l),
t._currentRenderer2 !== void 0 &&
t._currentRenderer2 !== null &&
t._currentRenderer2 !== Xr &&
c(
- "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
+ "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.",
),
(t._currentRenderer2 = Xr);
}
@@ -9209,7 +8247,7 @@ var Hd = an((pa) => {
c(
"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",
r,
- t
+ t,
));
}
}),
@@ -9220,7 +8258,7 @@ var Hd = an((pa) => {
($n.add(l),
c(
"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
- l
+ l,
));
}
});
@@ -9237,7 +8275,7 @@ var Hd = an((pa) => {
Please check the code for the %s component.`,
r,
r,
- u
+ u,
),
(Bo[p] = !0);
}
@@ -9248,9 +8286,7 @@ Please check the code for the %s component.`,
},
enqueueSetState: function (t, r, l) {
var u = ri(t);
- u.queue === null
- ? $o(t, "setState")
- : (u.queue.push(r), l != null && Jr(l, "setState"));
+ u.queue === null ? $o(t, "setState") : (u.queue.push(r), l != null && Jr(l, "setState"));
},
enqueueReplaceState: function (t, r, l) {
var u = ri(t);
@@ -9258,9 +8294,7 @@ Please check the code for the %s component.`,
},
enqueueForceUpdate: function (t, r) {
var l = ri(t);
- l.queue === null
- ? $o(t, "forceUpdate")
- : r != null && Jr(r, "setState");
+ l.queue === null ? $o(t, "forceUpdate") : r != null && Jr(r, "setState");
},
};
function al(t, r, l, u, p) {
@@ -9273,9 +8307,7 @@ Please check the code for the %s component.`,
var u = Bn,
p = t.contextType;
if ("contextType" in t) {
- var g =
- p === null ||
- (p !== void 0 && p.$$typeof === Io && p._context === void 0);
+ var g = p === null || (p !== void 0 && p.$$typeof === Io && p._context === void 0);
if (!g && !Nn.has(t)) {
Nn.add(t);
var y = "";
@@ -9288,24 +8320,18 @@ Please check the code for the %s component.`,
? (y = " Did you accidentally pass the Context.Provider instead?")
: p._context !== void 0
? (y = " Did you accidentally pass the Context.Consumer instead?")
- : (y =
- " However, it is set to an object with keys {" +
- Object.keys(p).join(", ") +
- "}."),
+ : (y = " However, it is set to an object with keys {" + Object.keys(p).join(", ") + "}."),
c(
"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
ie(t) || "Component",
- y
+ y,
);
}
}
typeof p == "object" && p !== null ? (u = Hn(p)) : (u = l);
var w = new t(r, u);
{
- if (
- typeof t.getDerivedStateFromProps == "function" &&
- (w.state === null || w.state === void 0)
- ) {
+ if (typeof t.getDerivedStateFromProps == "function" && (w.state === null || w.state === void 0)) {
var C = ie(t) || "Component";
Uo.has(C) ||
(Uo.add(C),
@@ -9313,32 +8339,24 @@ Please check the code for the %s component.`,
"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",
C,
w.state === null ? "null" : "undefined",
- C
+ C,
));
}
- if (
- typeof t.getDerivedStateFromProps == "function" ||
- typeof w.getSnapshotBeforeUpdate == "function"
- ) {
+ if (typeof t.getDerivedStateFromProps == "function" || typeof w.getSnapshotBeforeUpdate == "function") {
var _ = null,
O = null,
j = null;
if (
- (typeof w.componentWillMount == "function" &&
- w.componentWillMount.__suppressDeprecationWarning !== !0
+ (typeof w.componentWillMount == "function" && w.componentWillMount.__suppressDeprecationWarning !== !0
? (_ = "componentWillMount")
- : typeof w.UNSAFE_componentWillMount == "function" &&
- (_ = "UNSAFE_componentWillMount"),
+ : typeof w.UNSAFE_componentWillMount == "function" && (_ = "UNSAFE_componentWillMount"),
typeof w.componentWillReceiveProps == "function" &&
w.componentWillReceiveProps.__suppressDeprecationWarning !== !0
? (O = "componentWillReceiveProps")
- : typeof w.UNSAFE_componentWillReceiveProps == "function" &&
- (O = "UNSAFE_componentWillReceiveProps"),
- typeof w.componentWillUpdate == "function" &&
- w.componentWillUpdate.__suppressDeprecationWarning !== !0
+ : typeof w.UNSAFE_componentWillReceiveProps == "function" && (O = "UNSAFE_componentWillReceiveProps"),
+ typeof w.componentWillUpdate == "function" && w.componentWillUpdate.__suppressDeprecationWarning !== !0
? (j = "componentWillUpdate")
- : typeof w.UNSAFE_componentWillUpdate == "function" &&
- (j = "UNSAFE_componentWillUpdate"),
+ : typeof w.UNSAFE_componentWillUpdate == "function" && (j = "UNSAFE_componentWillUpdate"),
_ !== null || O !== null || j !== null)
) {
var Z = ie(t) || "Component",
@@ -9368,7 +8386,7 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
j !== null
? `
` + j
- : ""
+ : "",
));
}
}
@@ -9383,39 +8401,39 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
(r.prototype && typeof r.prototype.render == "function"
? c(
"%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",
- u
+ u,
)
: c(
"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",
- u
+ u,
)),
t.getInitialState &&
!t.getInitialState.isReactClassApproved &&
!t.state &&
c(
"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",
- u
+ u,
),
t.getDefaultProps &&
!t.getDefaultProps.isReactClassApproved &&
c(
"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
- u
+ u,
),
t.propTypes &&
c(
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",
- u
+ u,
),
t.contextType &&
c(
"contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
- u
+ u,
),
t.contextTypes &&
c(
"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",
- u
+ u,
),
r.contextType &&
r.contextTypes &&
@@ -9423,39 +8441,36 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
(Qr.add(r),
c(
"%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",
- u
+ u,
)),
typeof t.componentShouldUpdate == "function" &&
c(
"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",
- u
+ u,
),
r.prototype &&
r.prototype.isPureReactComponent &&
typeof t.shouldComponentUpdate < "u" &&
c(
"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
- ie(r) || "A pure component"
+ ie(r) || "A pure component",
),
typeof t.componentDidUnmount == "function" &&
c(
"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
- u
+ u,
),
typeof t.componentDidReceiveProps == "function" &&
c(
"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",
- u
+ u,
),
typeof t.componentWillRecieveProps == "function" &&
- c(
- "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
- u
- ),
+ c("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", u),
typeof t.UNSAFE_componentWillRecieveProps == "function" &&
c(
"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
- u
+ u,
);
var g = t.props !== l;
t.props !== void 0 &&
@@ -9463,13 +8478,13 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
c(
"%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
u,
- u
+ u,
),
t.defaultProps &&
c(
"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
u,
- u
+ u,
),
typeof t.getSnapshotBeforeUpdate == "function" &&
typeof t.componentDidUpdate != "function" &&
@@ -9477,33 +8492,28 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
(jo.add(r),
c(
"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
- ie(r)
+ ie(r),
)),
typeof t.getDerivedStateFromProps == "function" &&
c(
"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
- u
+ u,
),
typeof t.getDerivedStateFromError == "function" &&
c(
"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
- u
+ u,
),
typeof r.getSnapshotBeforeUpdate == "function" &&
c(
"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
- u
+ u,
);
var y = t.state;
- y &&
- (typeof y != "object" || me(y)) &&
- c("%s.state: must be set to an object or null", u),
+ y && (typeof y != "object" || me(y)) && c("%s.state: must be set to an object or null", u),
typeof t.getChildContext == "function" &&
typeof r.childContextTypes != "object" &&
- c(
- "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
- u
- );
+ c("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", u);
}
}
function cu(t, r) {
@@ -9518,18 +8528,17 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
Please update the following components: %s`,
- u
+ u,
),
(ol[u] = !0));
}
r.componentWillMount();
}
- typeof r.UNSAFE_componentWillMount == "function" &&
- r.UNSAFE_componentWillMount(),
+ typeof r.UNSAFE_componentWillMount == "function" && r.UNSAFE_componentWillMount(),
l !== r.state &&
(c(
"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
- ie(t) || "Component"
+ ie(t) || "Component",
),
ni.enqueueReplaceState(r, r.state, null));
}
@@ -9537,14 +8546,9 @@ Please update the following components: %s`,
if (t.queue !== null && t.queue.length > 0) {
var p = t.queue,
g = t.replace;
- if (((t.queue = null), (t.replace = !1), g && p.length === 1))
- r.state = p[0];
+ if (((t.queue = null), (t.replace = !1), g && p.length === 1)) r.state = p[0];
else {
- for (
- var y = g ? p[0] : r.state, w = !0, C = g ? 1 : 0;
- C < p.length;
- C++
- ) {
+ for (var y = g ? p[0] : r.state, w = !0, C = g ? 1 : 0; C < p.length; C++) {
var _ = p[C],
O = typeof _ == "function" ? _.call(r, y, l, u) : _;
O != null && (w ? ((w = !1), (y = Qe({}, y, O))) : Qe(y, O));
@@ -9560,26 +8564,20 @@ Please update the following components: %s`,
var g = { queue: [], replace: !1 };
Wn(t, g);
var y = r.contextType;
- if (
- (typeof y == "object" && y !== null
- ? (t.context = Hn(y))
- : (t.context = u),
- t.state === l)
- ) {
+ if ((typeof y == "object" && y !== null ? (t.context = Hn(y)) : (t.context = u), t.state === l)) {
var w = ie(r) || "Component";
Wo.has(w) ||
(Wo.add(w),
c(
"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
- w
+ w,
));
}
var C = r.getDerivedStateFromProps;
typeof C == "function" && (t.state = al(t, r, C, p, l)),
typeof r.getDerivedStateFromProps != "function" &&
typeof t.getSnapshotBeforeUpdate != "function" &&
- (typeof t.UNSAFE_componentWillMount == "function" ||
- typeof t.componentWillMount == "function") &&
+ (typeof t.UNSAFE_componentWillMount == "function" || typeof t.componentWillMount == "function") &&
(cu(r, t), fu(g, t, l, u));
}
var du = { id: 1, overflow: "" };
@@ -9628,9 +8626,7 @@ Please update the following components: %s`,
return r === 0 ? 32 : (31 - ((pu(r) / hu) | 0)) | 0;
}
function gu(t, r) {
- return (
- (t === r && (t !== 0 || 1 / t === 1 / r)) || (t !== t && r !== r)
- );
+ return (t === r && (t !== 0 || 1 / t === 1 / r)) || (t !== t && r !== r);
}
var mu = typeof Object.is == "function" ? Object.is : gu,
At = null,
@@ -9655,7 +8651,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return (
$e &&
c(
- "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks"
+ "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks",
),
At
);
@@ -9665,7 +8661,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return (
c(
"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
- Kr
+ Kr,
),
!1
);
@@ -9677,17 +8673,13 @@ Previous: %s
Incoming: %s`,
Kr,
"[" + t.join(", ") + "]",
- "[" + r.join(", ") + "]"
+ "[" + r.join(", ") + "]",
);
- for (var l = 0; l < r.length && l < t.length; l++)
- if (!mu(t[l], r[l])) return !1;
+ for (var l = 0; l < r.length && l < t.length; l++) if (!mu(t[l], r[l])) return !1;
return !0;
}
function Xt() {
- if (Sr > 0)
- throw new Error(
- "Rendered more hooks than during the previous render"
- );
+ if (Sr > 0) throw new Error("Rendered more hooks than during the previous render");
return { memoizedState: null, queue: null, next: null };
}
function li() {
@@ -9714,20 +8706,13 @@ Incoming: %s`,
return t;
}
function ui() {
- ($e = !1),
- (At = null),
- (ii = null),
- (G = !1),
- (Ke = null),
- (Sr = 0),
- (ot = null),
- (X = null);
+ ($e = !1), (At = null), (ii = null), (G = !1), (Ke = null), (Sr = 0), (ot = null), (X = null);
}
function fl(t) {
return (
$e &&
c(
- "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
+ "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().",
),
Hn(t)
);
@@ -9762,9 +8747,7 @@ Incoming: %s`,
} else {
$e = !0;
var _;
- t === fi
- ? (_ = typeof r == "function" ? r() : r)
- : (_ = l !== void 0 ? l(r) : r),
+ t === fi ? (_ = typeof r == "function" ? r() : r) : (_ = l !== void 0 ? l(r) : r),
($e = !1),
(X.memoizedState = _);
var O = (X.queue = { last: null, dispatch: null }),
@@ -9797,14 +8780,12 @@ Incoming: %s`,
function hl(t, r) {
(Kr = "useLayoutEffect"),
c(
- "useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes."
+ "useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.",
);
}
function bu(t, r, l) {
if (Sr >= Gt)
- throw new Error(
- "Too many re-renders. React limits the number of renders to prevent an infinite loop."
- );
+ throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
if (t === At) {
G = !0;
var u = { action: l, next: null };
@@ -9828,7 +8809,7 @@ Incoming: %s`,
function xu(t, r, l) {
if (l === void 0)
throw new Error(
- "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
+ "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.",
);
return l();
}
@@ -9836,9 +8817,7 @@ Incoming: %s`,
return Ie(), t;
}
function Tu() {
- throw new Error(
- "startTransition cannot be called during server rendering."
- );
+ throw new Error("startTransition cannot be called during server rendering.");
}
function Cu() {
return Ie(), [!1, Tu];
@@ -9848,9 +8827,7 @@ Incoming: %s`,
r = sl(t.treeContext),
l = en;
if (l === null)
- throw new Error(
- "Invalid hook call. Hooks can only be called inside of the body of a function component."
- );
+ throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");
var u = Yt++;
return zt(l, r, u);
}
@@ -9974,8 +8951,7 @@ Error generating stack: ` +
};
}
function mi(t, r, l, u, p, g, y, w) {
- t.allPendingTasks++,
- l === null ? t.pendingRootTasks++ : l.pendingTasks++;
+ t.allPendingTasks++, l === null ? t.pendingRootTasks++ : l.pendingTasks++;
var C = {
node: r,
ping: function () {
@@ -10006,9 +8982,7 @@ Error generating stack: ` +
}
var at = null;
function nn() {
- return at === null || at.componentStack === null
- ? ""
- : pi(at.componentStack);
+ return at === null || at.componentStack === null ? "" : pi(at.componentStack);
}
function Ne(t, r) {
t.componentStack = { tag: 0, parent: t.componentStack, type: r };
@@ -10021,20 +8995,14 @@ Error generating stack: ` +
}
function Dt(t) {
t.componentStack === null
- ? c(
- "Unexpectedly popped too many stack frames. This is a bug in React."
- )
+ ? c("Unexpectedly popped too many stack frames. This is a bug in React.")
: (t.componentStack = t.componentStack.parent);
}
var Zn = null;
function mt(t, r) {
{
var l;
- typeof r == "string"
- ? (l = r)
- : r && typeof r.message == "string"
- ? (l = r.message)
- : (l = String(r));
+ typeof r == "string" ? (l = r) : r && typeof r.message == "string" ? (l = r.message) : (l = String(r));
var u = Zn || nn();
(Zn = null), (t.errorMessage = l), (t.errorComponentStack = u);
}
@@ -10045,7 +9013,7 @@ Error generating stack: ` +
throw new Error(
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' +
typeof l +
- '" instead'
+ '" instead',
);
return l;
}
@@ -10053,10 +9021,7 @@ Error generating stack: ` +
var l = t.onShellError;
l(r);
var u = t.onFatalError;
- u(r),
- t.destination !== null
- ? ((t.status = tn), Oe(t.destination, r))
- : ((t.status = gi), (t.fatalError = r));
+ u(r), t.destination !== null ? ((t.status = tn), Oe(t.destination, r)) : ((t.status = gi), (t.fatalError = r));
}
function Jn(t, r, l) {
Ne(r, "Suspense");
@@ -10083,10 +9048,7 @@ Error generating stack: ` +
return;
}
} catch (de) {
- (j.status = vi),
- (C.forceClientRender = !0),
- (C.errorDigest = Ot(t, de)),
- mt(C, de);
+ (j.status = vi), (C.forceClientRender = !0), (C.errorDigest = Ot(t, de)), mt(C, de);
} finally {
(r.blockedBoundary = u), (r.blockedSegment = p);
}
@@ -10121,7 +9083,7 @@ Error generating stack: ` +
(Si ||
c(
"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
- ie(u) || "a component"
+ ie(u) || "a component",
),
(Si = !0));
{
@@ -10151,44 +9113,30 @@ Error generating stack: ` +
ki = !1;
function xl(t, r, l, u) {
var p;
- if (
- ((p = Do(l, r.legacyContext)),
- Qo(r, l),
- l.prototype && typeof l.prototype.render == "function")
- ) {
+ if (((p = Do(l, r.legacyContext)), Qo(r, l), l.prototype && typeof l.prototype.render == "function")) {
var g = ie(l) || "Unknown";
yi[g] ||
(c(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",
g,
- g
+ g,
),
(yi[g] = !0));
}
var y = bl(t, r, l, u, p),
w = cl();
- if (
- typeof y == "object" &&
- y !== null &&
- typeof y.render == "function" &&
- y.$$typeof === void 0
- ) {
+ if (typeof y == "object" && y !== null && typeof y.render == "function" && y.$$typeof === void 0) {
var C = ie(l) || "Unknown";
qo[C] ||
(c(
"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",
C,
C,
- C
+ C,
),
(qo[C] = !0));
}
- if (
- typeof y == "object" &&
- y !== null &&
- typeof y.render == "function" &&
- y.$$typeof === void 0
- ) {
+ if (typeof y == "object" && y !== null && typeof y.render == "function" && y.$$typeof === void 0) {
{
var _ = ie(l) || "Unknown";
qo[_] ||
@@ -10196,7 +9144,7 @@ Error generating stack: ` +
"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",
_,
_,
- _
+ _,
),
(qo[_] = !0));
}
@@ -10221,23 +9169,16 @@ Error generating stack: ` +
t.childContextTypes &&
c(
"%s(...): childContextTypes cannot be defined on a function component.",
- t.displayName || t.name || "Component"
+ t.displayName || t.name || "Component",
),
typeof t.getDerivedStateFromProps == "function")
) {
var r = ie(t) || "Unknown";
- Qn[r] ||
- (c(
- "%s: Function components do not support getDerivedStateFromProps.",
- r
- ),
- (Qn[r] = !0));
+ Qn[r] || (c("%s: Function components do not support getDerivedStateFromProps.", r), (Qn[r] = !0));
}
if (typeof t.contextType == "object" && t.contextType !== null) {
var l = ie(t) || "Unknown";
- bi[l] ||
- (c("%s: Function components do not support contextType.", l),
- (bi[l] = !0));
+ bi[l] || (c("%s: Function components do not support contextType.", l), (bi[l] = !0));
}
}
}
@@ -10278,13 +9219,13 @@ Error generating stack: ` +
(ki ||
((ki = !0),
c(
- "Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"
+ "Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?",
)))
: (l = l._context);
var p = u.children;
typeof p != "function" &&
c(
- "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
+ "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.",
);
var g = Hn(l),
y = p(g);
@@ -10300,9 +9241,7 @@ Error generating stack: ` +
Pe(t, r, y),
(r.context = Lo(p)),
w !== r.context &&
- c(
- "Popping the context provider did not return back to the original snapshot. This is a bug in React."
- );
+ c("Popping the context provider did not return back to the original snapshot. This is a bug in React.");
}
function Au(t, r, l, u, p) {
Ne(r, "Lazy");
@@ -10339,9 +9278,7 @@ Error generating stack: ` +
return;
}
case za:
- throw new Error(
- "ReactDOMServer does not yet support scope components."
- );
+ throw new Error("ReactDOMServer does not yet support scope components.");
case An: {
Jn(t, r, u);
return;
@@ -10372,15 +9309,12 @@ Error generating stack: ` +
}
var g = "";
throw (
- ((l === void 0 ||
- (typeof l == "object" &&
- l !== null &&
- Object.keys(l).length === 0)) &&
+ ((l === void 0 || (typeof l == "object" && l !== null && Object.keys(l).length === 0)) &&
(g +=
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),
new Error(
"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) " +
- ("but got: " + (l == null ? l : typeof l) + "." + g)
+ ("but got: " + (l == null ? l : typeof l) + "." + g),
))
);
}
@@ -10389,14 +9323,11 @@ Error generating stack: ` +
t[Symbol.toStringTag] === "Generator" &&
(wi ||
c(
- "Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."
+ "Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.",
),
(wi = !0)),
t.entries === r &&
- (xi ||
- c(
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
- ),
+ (xi || c("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),
(xi = !0));
}
function Pe(t, r, l) {
@@ -10404,11 +9335,7 @@ Error generating stack: ` +
return Ou(t, r, l);
} catch (u) {
throw (
- ((typeof u == "object" &&
- u !== null &&
- typeof u.then == "function") ||
- (Zn = Zn !== null ? Zn : nn()),
- u)
+ ((typeof u == "object" && u !== null && typeof u.then == "function") || (Zn = Zn !== null ? Zn : nn()), u)
);
}
}
@@ -10425,7 +9352,7 @@ Error generating stack: ` +
}
case ze:
throw new Error(
- "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
+ "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.",
);
case $r: {
var w = l,
@@ -10435,13 +9362,7 @@ Error generating stack: ` +
try {
O = _(C);
} catch (la) {
- throw (
- (typeof la == "object" &&
- la !== null &&
- typeof la.then == "function" &&
- Ne(r, "Lazy"),
- la)
- );
+ throw (typeof la == "object" && la !== null && typeof la.then == "function" && Ne(r, "Lazy"), la);
}
Pe(t, r, O);
return;
@@ -10470,35 +9391,23 @@ Error generating stack: ` +
var aa = Object.prototype.toString.call(l);
throw new Error(
"Objects are not valid as a React child (found: " +
- (aa === "[object Object]"
- ? "object with keys {" + Object.keys(l).join(", ") + "}"
- : aa) +
- "). If you meant to render a collection of children, use an array instead."
+ (aa === "[object Object]" ? "object with keys {" + Object.keys(l).join(", ") + "}" : aa) +
+ "). If you meant to render a collection of children, use an array instead.",
);
}
if (typeof l == "string") {
var ia = r.blockedSegment;
- ia.lastPushedText = Xi(
- r.blockedSegment.chunks,
- l,
- t.responseState,
- ia.lastPushedText
- );
+ ia.lastPushedText = Xi(r.blockedSegment.chunks, l, t.responseState, ia.lastPushedText);
return;
}
if (typeof l == "number") {
var Dl = r.blockedSegment;
- Dl.lastPushedText = Xi(
- r.blockedSegment.chunks,
- "" + l,
- t.responseState,
- Dl.lastPushedText
- );
+ Dl.lastPushedText = Xi(r.blockedSegment.chunks, "" + l, t.responseState, Dl.lastPushedText);
return;
}
typeof l == "function" &&
c(
- "Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."
+ "Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.",
);
}
function Ue(t, r, l) {
@@ -10517,18 +9426,8 @@ Error generating stack: ` +
p = u.chunks.length,
g = Jo(t, p, null, u.formatContext, u.lastPushedText, !0);
u.children.push(g), (u.lastPushedText = !1);
- var y = mi(
- t,
- r.node,
- r.blockedBoundary,
- g,
- r.abortSet,
- r.legacyContext,
- r.context,
- r.treeContext
- );
- r.componentStack !== null &&
- (y.componentStack = r.componentStack.parent);
+ var y = mi(t, r.node, r.blockedBoundary, g, r.abortSet, r.legacyContext, r.context, r.treeContext);
+ r.componentStack !== null && (y.componentStack = r.componentStack.parent);
var w = y.ping;
l.then(w, w);
}
@@ -10541,10 +9440,7 @@ Error generating stack: ` +
try {
return Pe(t, r, l);
} catch (w) {
- if (
- (ui(),
- typeof w == "object" && w !== null && typeof w.then == "function")
- ) {
+ if ((ui(), typeof w == "object" && w !== null && typeof w.then == "function")) {
Mu(t, r, w),
(r.blockedSegment.formatContext = u),
(r.legacyContext = p),
@@ -10591,24 +9487,15 @@ Error generating stack: ` +
var u = t.blockedBoundary,
p = t.blockedSegment;
if (((p.status = wr), u === null))
- r.allPendingTasks--,
- r.status !== tn &&
- ((r.status = tn), r.destination !== null && V(r.destination));
+ r.allPendingTasks--, r.status !== tn && ((r.status = tn), r.destination !== null && V(r.destination));
else {
if ((u.pendingTasks--, !u.forceClientRender)) {
u.forceClientRender = !0;
- var g =
- l === void 0
- ? new Error(
- "The render was aborted by the server without a reason."
- )
- : l;
+ var g = l === void 0 ? new Error("The render was aborted by the server without a reason.") : l;
u.errorDigest = r.onError(g);
{
var y = "The server did not finish this Suspense boundary: ";
- g && typeof g.message == "string"
- ? (g = y + g.message)
- : (g = y + String(g));
+ g && typeof g.message == "string" ? (g = y + g.message) : (g = y + String(g));
var w = at;
at = t;
try {
@@ -10633,11 +9520,7 @@ Error generating stack: ` +
}
}
function ta(t, r) {
- if (
- r.chunks.length === 0 &&
- r.children.length === 1 &&
- r.children[0].boundary === null
- ) {
+ if (r.chunks.length === 0 && r.children.length === 1 && r.children[0].boundary === null) {
var l = r.children[0];
(l.id = r.id), (l.parentFlushed = !0), l.status === Zt && ta(t, l);
} else {
@@ -10649,9 +9532,7 @@ Error generating stack: ` +
if (r === null) {
if (l.parentFlushed) {
if (t.completedRootSegment !== null)
- throw new Error(
- "There can only be one root segment. This is a bug in React."
- );
+ throw new Error("There can only be one root segment. This is a bug in React.");
t.completedRootSegment = l;
}
if ((t.pendingRootTasks--, t.pendingRootTasks === 0)) {
@@ -10689,16 +9570,10 @@ Error generating stack: ` +
(l.status = Zt),
Ei(t, r.blockedBoundary, l);
} catch (g) {
- if (
- (ui(),
- typeof g == "object" && g !== null && typeof g.then == "function")
- ) {
+ if ((ui(), typeof g == "object" && g !== null && typeof g.then == "function")) {
var p = r.ping;
g.then(p, p);
- } else
- r.abortSet.delete(r),
- (l.status = vi),
- Lu(t, r.blockedBoundary, l, g);
+ } else r.abortSet.delete(r), (l.status = vi), Lu(t, r.blockedBoundary, l, g);
} finally {
at = u;
}
@@ -10724,10 +9599,7 @@ Error generating stack: ` +
} catch (C) {
Ot(t, C), on(t, C);
} finally {
- di(p),
- (Xo.current = l),
- (hi.getCurrentStack = u),
- l === vl && jn(r);
+ di(p), (Xo.current = l), (hi.getCurrentStack = u), l === vl && jn(r);
}
}
}
@@ -10735,19 +9607,11 @@ Error generating stack: ` +
switch (((l.parentFlushed = !0), l.status)) {
case Vn: {
var u = (l.id = t.nextSegmentId++);
- return (
- (l.lastPushedText = !1),
- (l.textEmbedded = !1),
- k(r, t.responseState, u)
- );
+ return (l.lastPushedText = !1), (l.textEmbedded = !1), k(r, t.responseState, u);
}
case Zt: {
l.status = Zo;
- for (
- var p = !0, g = l.chunks, y = 0, w = l.children, C = 0;
- C < w.length;
- C++
- ) {
+ for (var p = !0, g = l.chunks, y = 0, w = l.children, C = 0; C < w.length; C++) {
for (var _ = w[C]; y < _.index; y++) x(r, g[y]);
p = Kn(t, r, _);
}
@@ -10756,7 +9620,7 @@ Error generating stack: ` +
}
default:
throw new Error(
- "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
+ "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.",
);
}
}
@@ -10765,19 +9629,12 @@ Error generating stack: ` +
if (u === null) return na(t, r, l);
if (((u.parentFlushed = !0), u.forceClientRender))
return (
- qs(
- r,
- t.responseState,
- u.errorDigest,
- u.errorMessage,
- u.errorComponentStack
- ),
+ qs(r, t.responseState, u.errorDigest, u.errorMessage, u.errorComponentStack),
na(t, r, l),
eu(r, t.responseState)
);
if (u.pendingTasks > 0) {
- (u.rootSegmentID = t.nextSegmentId++),
- u.completedSegments.length > 0 && t.partialBoundaries.push(u);
+ (u.rootSegmentID = t.nextSegmentId++), u.completedSegments.length > 0 && t.partialBoundaries.push(u);
var p = (u.id = Wt(t.responseState));
return yr(r, t.responseState, p), na(t, r, l), Co(r, t.responseState);
} else {
@@ -10793,28 +9650,17 @@ Error generating stack: ` +
var g = u.completedSegments;
if (g.length !== 1)
throw new Error(
- "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React.",
);
var y = g[0];
return Kn(t, r, y), Ua(r, t.responseState);
}
}
function oa(t, r, l) {
- return Js(
- r,
- t.responseState,
- l.id,
- l.errorDigest,
- l.errorMessage,
- l.errorComponentStack
- );
+ return Js(r, t.responseState, l.id, l.errorDigest, l.errorMessage, l.errorComponentStack);
}
function qn(t, r, l) {
- return (
- Fs(r, t.responseState, l.formatContext, l.id),
- Kn(t, r, l),
- As(r, l.formatContext)
- );
+ return Fs(r, t.responseState, l.formatContext, l.id), Kn(t, r, l), As(r, l.formatContext);
}
function Rl(t, r, l) {
for (var u = l.completedSegments, p = 0; p < u.length; p++) {
@@ -10835,10 +9681,7 @@ Error generating stack: ` +
var p = u.id;
if (p === -1) {
var g = (u.id = l.rootSegmentID);
- if (g === -1)
- throw new Error(
- "A root segment ID must have been assigned by now. This is a bug in React."
- );
+ if (g === -1) throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");
return qn(t, r, u);
} else return qn(t, r, u), Hs(r, t.responseState, p);
}
@@ -10847,9 +9690,7 @@ Error generating stack: ` +
var l = t.completedRootSegment;
l !== null &&
t.pendingRootTasks === 0 &&
- (Kn(t, r, l),
- (t.completedRootSegment = null),
- _n(r, t.responseState));
+ (Kn(t, r, l), (t.completedRootSegment = null), _n(r, t.responseState));
var u = t.clientRenderedBoundaries,
p;
for (p = 0; p < u.length; p++) {
@@ -10893,9 +9734,7 @@ Error generating stack: ` +
t.clientRenderedBoundaries.length === 0 &&
t.completedBoundaries.length === 0 &&
(t.abortableTasks.size !== 0 &&
- c(
- "There was still abortable task at the root when we closed. This is a bug in React."
- ),
+ c("There was still abortable task at the root when we closed. This is a bug in React."),
V(r));
}
}
@@ -10947,39 +9786,22 @@ Error generating stack: ` +
function _() {
C = !0;
}
- var O = yl(
- t,
- Yi(l, r ? r.identifierPrefix : void 0),
- Gi(),
- 1 / 0,
- Pl,
- void 0,
- _,
- void 0,
- void 0
- );
+ var O = yl(t, Yi(l, r ? r.identifierPrefix : void 0), Gi(), 1 / 0, Pl, void 0, _, void 0, void 0);
if ((Pi(O), _l(O, u), eo(O, w), p)) throw g;
if (!C)
throw new Error(
- "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition."
+ "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.",
);
return y;
}
function Bu(t, r) {
- (t.prototype = Object.create(r.prototype)),
- (t.prototype.constructor = t),
- (t.__proto__ = r);
+ (t.prototype = Object.create(r.prototype)), (t.prototype.constructor = t), (t.__proto__ = r);
}
var Fl = (function (t) {
Bu(r, t);
function r() {
var u;
- return (
- (u = t.call(this, {}) || this),
- (u.request = null),
- (u.startedFlowing = !1),
- u
- );
+ return (u = t.call(this, {}) || this), (u.request = null), (u.startedFlowing = !1), u;
}
var l = r.prototype;
return (
@@ -10998,25 +9820,11 @@ Error generating stack: ` +
(p.startedFlowing = !0), eo(g, p);
}
var p = new Fl(),
- g = yl(
- t,
- Yi(!1, r ? r.identifierPrefix : void 0),
- Gi(),
- 1 / 0,
- Uu,
- u,
- void 0,
- void 0
- );
+ g = yl(t, Yi(!1, r ? r.identifierPrefix : void 0), Gi(), 1 / 0, Uu, u, void 0, void 0);
return (p.request = g), Pi(g), p;
}
function o(t, r) {
- return (
- c(
- "renderToNodeStream is deprecated. Use renderToPipeableStream instead."
- ),
- Al(t, r)
- );
+ return c("renderToNodeStream is deprecated. Use renderToPipeableStream instead."), Al(t, r);
}
function a(t, r) {
return Al(t, r);
@@ -11026,7 +9834,7 @@ Error generating stack: ` +
t,
r,
!1,
- 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server'
+ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server',
);
}
function d(t, r) {
@@ -11034,7 +9842,7 @@ Error generating stack: ` +
t,
r,
!0,
- 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server'
+ 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server',
);
}
(pa.renderToNodeStream = o),
@@ -11044,7 +9852,7 @@ Error generating stack: ` +
(pa.version = i);
})();
});
-var Wd = an((Pc) => {
+var Wd = an(Pc => {
"use strict";
process.env.NODE_ENV !== "production" &&
(function () {
@@ -11055,23 +9863,13 @@ var Wd = an((Pc) => {
s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function v(o) {
{
- for (
- var a = arguments.length, f = new Array(a > 1 ? a - 1 : 0), d = 1;
- d < a;
- d++
- )
- f[d - 1] = arguments[d];
+ for (var a = arguments.length, f = new Array(a > 1 ? a - 1 : 0), d = 1; d < a; d++) f[d - 1] = arguments[d];
m("warn", o, f);
}
}
function c(o) {
{
- for (
- var a = arguments.length, f = new Array(a > 1 ? a - 1 : 0), d = 1;
- d < a;
- d++
- )
- f[d - 1] = arguments[d];
+ for (var a = arguments.length, f = new Array(a > 1 ? a - 1 : 0), d = 1; d < a; d++) f[d - 1] = arguments[d];
m("error", o, f);
}
}
@@ -11083,8 +9881,7 @@ var Wd = an((Pc) => {
var r = f.map(function (l) {
return String(l);
});
- r.unshift("Warning: " + a),
- Function.prototype.apply.call(console[o], console, r);
+ r.unshift("Warning: " + a), Function.prototype.apply.call(console[o], console, r);
}
}
function S(o) {
@@ -11103,9 +9900,7 @@ var Wd = an((Pc) => {
function J(o, a) {
if (a.length !== 0) {
if (a.length * 3 > x) {
- D > 0 &&
- (ue(o, R.subarray(0, D)), (R = new Uint8Array(x)), (D = 0)),
- ue(o, _e.encode(a));
+ D > 0 && (ue(o, R.subarray(0, D)), (R = new Uint8Array(x)), (D = 0)), ue(o, _e.encode(a));
return;
}
var f = R;
@@ -11114,30 +9909,20 @@ var Wd = an((Pc) => {
t = d.read,
r = d.written;
(D += r),
- t < a.length &&
- (ue(o, R),
- (R = new Uint8Array(x)),
- (D = _e.encodeInto(a.slice(t), R).written)),
+ t < a.length && (ue(o, R), (R = new Uint8Array(x)), (D = _e.encodeInto(a.slice(t), R).written)),
D === x && (ue(o, R), (R = new Uint8Array(x)), (D = 0));
}
}
function Oe(o, a) {
if (a.byteLength !== 0) {
if (a.byteLength > x) {
- D > 0 &&
- (ue(o, R.subarray(0, D)), (R = new Uint8Array(x)), (D = 0)),
- ue(o, a);
+ D > 0 && (ue(o, R.subarray(0, D)), (R = new Uint8Array(x)), (D = 0)), ue(o, a);
return;
}
var f = a,
d = R.length - D;
d < f.byteLength &&
- (d === 0
- ? ue(o, R)
- : (R.set(f.subarray(0, d), D),
- (D += d),
- ue(o, R),
- (f = f.subarray(d))),
+ (d === 0 ? ue(o, R) : (R.set(f.subarray(0, d), D), (D += d), ue(o, R), (f = f.subarray(d))),
(R = new Uint8Array(x)),
(D = 0)),
R.set(f, D),
@@ -11194,7 +9979,7 @@ var Wd = an((Pc) => {
c(
"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",
a,
- qt(o)
+ qt(o),
),
Mt(o)
);
@@ -11205,7 +9990,7 @@ var Wd = an((Pc) => {
c(
"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",
a,
- qt(o)
+ qt(o),
),
Mt(o)
);
@@ -11215,7 +10000,7 @@ var Wd = an((Pc) => {
return (
c(
"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",
- qt(o)
+ qt(o),
),
Mt(o)
);
@@ -11296,17 +10081,10 @@ var Wd = an((Pc) => {
f = o[1];
ve[a] = new ye(a, tt, !1, f, null, !1, !1);
}),
- ["contentEditable", "draggable", "spellCheck", "value"].forEach(
- function (o) {
- ve[o] = new ye(o, Bt, !1, o.toLowerCase(), null, !1, !1);
- }
- ),
- [
- "autoReverse",
- "externalResourcesRequired",
- "focusable",
- "preserveAlpha",
- ].forEach(function (o) {
+ ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (o) {
+ ve[o] = new ye(o, Bt, !1, o.toLowerCase(), null, !1, !1);
+ }),
+ ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function (o) {
ve[o] = new ye(o, Bt, !1, o, null, !1, !1);
}),
[
@@ -11430,42 +10208,21 @@ var Wd = an((Pc) => {
var a = o.replace(or, je);
ve[a] = new ye(a, tt, !1, o, null, !1, !1);
}),
- [
- "xlink:actuate",
- "xlink:arcrole",
- "xlink:role",
- "xlink:show",
- "xlink:title",
- "xlink:type",
- ].forEach(function (o) {
+ ["xlink:actuate", "xlink:arcrole", "xlink:role", "xlink:show", "xlink:title", "xlink:type"].forEach(function (
+ o,
+ ) {
var a = o.replace(or, je);
ve[a] = new ye(a, tt, !1, o, "http://www.w3.org/1999/xlink", !1, !1);
}),
["xml:base", "xml:lang", "xml:space"].forEach(function (o) {
var a = o.replace(or, je);
- ve[a] = new ye(
- a,
- tt,
- !1,
- o,
- "http://www.w3.org/XML/1998/namespace",
- !1,
- !1
- );
+ ve[a] = new ye(a, tt, !1, o, "http://www.w3.org/XML/1998/namespace", !1, !1);
}),
["tabIndex", "crossOrigin"].forEach(function (o) {
ve[o] = new ye(o, tt, !1, o.toLowerCase(), null, !1, !1);
});
var ha = "xlinkHref";
- (ve[ha] = new ye(
- "xlinkHref",
- tt,
- !1,
- "xlink:href",
- "http://www.w3.org/1999/xlink",
- !0,
- !1
- )),
+ (ve[ha] = new ye("xlinkHref", tt, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1)),
["src", "href", "action", "formAction"].forEach(function (o) {
ve[o] = new ye(o, tt, !1, o.toLowerCase(), null, !0, !0);
});
@@ -11540,14 +10297,14 @@ var Wd = an((Pc) => {
a.disabled ||
a.value == null ||
c(
- "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
+ "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.",
),
a.onChange ||
a.readOnly ||
a.disabled ||
a.checked == null ||
c(
- "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
+ "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.",
);
}
function fn(o, a) {
@@ -11628,30 +10385,17 @@ var Wd = an((Pc) => {
d = sr.hasOwnProperty(f) ? f : null;
if (d == null)
return (
- c(
- "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
- a
- ),
- (pt[a] = !0),
- !0
- );
- if (a !== d)
- return (
- c("Invalid ARIA attribute `%s`. Did you mean `%s`?", a, d),
+ c("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", a),
(pt[a] = !0),
!0
);
+ if (a !== d) return c("Invalid ARIA attribute `%s`. Did you mean `%s`?", a, d), (pt[a] = !0), !0;
}
if (ke.test(a)) {
var t = a.toLowerCase(),
r = sr.hasOwnProperty(t) ? t : null;
if (r == null) return (pt[a] = !0), !1;
- if (a !== r)
- return (
- c("Unknown ARIA attribute `%s`. Did you mean `%s`?", a, r),
- (pt[a] = !0),
- !0
- );
+ if (a !== r) return c("Unknown ARIA attribute `%s`. Did you mean `%s`?", a, r), (pt[a] = !0), !0;
}
}
return !0;
@@ -11669,16 +10413,12 @@ var Wd = an((Pc) => {
})
.join(", ");
f.length === 1
- ? c(
- "Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",
- r,
- o
- )
+ ? c("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", r, o)
: f.length > 1 &&
c(
"Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",
r,
- o
+ o,
);
}
}
@@ -11696,11 +10436,11 @@ var Wd = an((Pc) => {
o === "select" && a.multiple
? c(
"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",
- o
+ o,
)
: c(
"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
- o
+ o,
));
}
}
@@ -12204,7 +10944,7 @@ var Wd = an((Pc) => {
if (t === "onfocusin" || t === "onfocusout")
return (
c(
- "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."
+ "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.",
),
(Te[a] = !0),
!0
@@ -12214,31 +10954,14 @@ var Wd = an((Pc) => {
l = d.possibleRegistrationNames;
if (r.hasOwnProperty(a)) return !0;
var u = l.hasOwnProperty(t) ? l[t] : null;
- if (u != null)
- return (
- c(
- "Invalid event handler property `%s`. Did you mean `%s`?",
- a,
- u
- ),
- (Te[a] = !0),
- !0
- );
- if (vo.test(a))
- return (
- c(
- "Unknown event handler property `%s`. It will be ignored.",
- a
- ),
- (Te[a] = !0),
- !0
- );
+ if (u != null) return c("Invalid event handler property `%s`. Did you mean `%s`?", a, u), (Te[a] = !0), !0;
+ if (vo.test(a)) return c("Unknown event handler property `%s`. It will be ignored.", a), (Te[a] = !0), !0;
} else if (vo.test(a))
return (
go.test(a) &&
c(
"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
- a
+ a,
),
(Te[a] = !0),
!0
@@ -12247,7 +10970,7 @@ var Wd = an((Pc) => {
if (t === "innerhtml")
return (
c(
- "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
+ "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.",
),
(Te[a] = !0),
!0
@@ -12255,7 +10978,7 @@ var Wd = an((Pc) => {
if (t === "aria")
return (
c(
- "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
+ "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.",
),
(Te[a] = !0),
!0
@@ -12264,17 +10987,14 @@ var Wd = an((Pc) => {
return (
c(
"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
- typeof f
+ typeof f,
),
(Te[a] = !0),
!0
);
if (typeof f == "number" && isNaN(f))
return (
- c(
- "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
- a
- ),
+ c("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.", a),
(Te[a] = !0),
!0
);
@@ -12282,18 +11002,13 @@ var Wd = an((Pc) => {
g = p !== null && p.type === Er;
if (pn.hasOwnProperty(t)) {
var y = pn[t];
- if (y !== a)
- return (
- c("Invalid DOM property `%s`. Did you mean `%s`?", a, y),
- (Te[a] = !0),
- !0
- );
+ if (y !== a) return c("Invalid DOM property `%s`. Did you mean `%s`?", a, y), (Te[a] = !0), !0;
} else if (!g && a !== t)
return (
c(
"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",
a,
- t
+ t,
),
(Te[a] = !0),
!0
@@ -12306,7 +11021,7 @@ var Wd = an((Pc) => {
a,
a,
f,
- a
+ a,
)
: c(
'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',
@@ -12316,7 +11031,7 @@ var Wd = an((Pc) => {
f,
a,
a,
- a
+ a,
),
(Te[a] = !0),
!0)
@@ -12335,7 +11050,7 @@ var Wd = an((Pc) => {
? "The browser will interpret it as a truthy value."
: 'Although this works, it will not work as expected if you pass the string "false".',
a,
- f
+ f,
),
(Te[a] = !0)),
!0);
@@ -12357,13 +11072,13 @@ var Wd = an((Pc) => {
? c(
"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",
l,
- o
+ o,
)
: d.length > 1 &&
c(
"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",
l,
- o
+ o,
);
}
};
@@ -12387,12 +11102,7 @@ var Wd = an((Pc) => {
},
Sa = function (o) {
(Ut.hasOwnProperty(o) && Ut[o]) ||
- ((Ut[o] = !0),
- c(
- "Unsupported style property %s. Did you mean %s?",
- o,
- ge(o.replace(ya, "ms-"))
- ));
+ ((Ut[o] = !0), c("Unsupported style property %s. Did you mean %s?", o, ge(o.replace(ya, "ms-"))));
},
wa = function (o) {
(Ut.hasOwnProperty(o) && Ut[o]) ||
@@ -12400,42 +11110,23 @@ var Wd = an((Pc) => {
c(
"Unsupported vendor-prefixed style property %s. Did you mean %s?",
o,
- o.charAt(0).toUpperCase() + o.slice(1)
+ o.charAt(0).toUpperCase() + o.slice(1),
));
},
xa = function (o, a) {
(gn.hasOwnProperty(a) && gn[a]) ||
((gn[a] = !0),
- c(
- `Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,
- o,
- a.replace(mo, "")
- ));
+ c(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`, o, a.replace(mo, "")));
},
ka = function (o, a) {
- jt ||
- ((jt = !0),
- c(
- "`NaN` is an invalid value for the `%s` css style property.",
- o
- ));
+ jt || ((jt = !0), c("`NaN` is an invalid value for the `%s` css style property.", o));
},
mn = function (o, a) {
- Pr ||
- ((Pr = !0),
- c(
- "`Infinity` is an invalid value for the `%s` css style property.",
- o
- ));
+ Pr || ((Pr = !0), c("`Infinity` is an invalid value for the `%s` css style property.", o));
};
ur = function (o, a) {
- o.indexOf("-") > -1
- ? Sa(o)
- : _r.test(o)
- ? wa(o)
- : mo.test(a) && xa(o, a),
- typeof a == "number" &&
- (isNaN(a) ? ka(o, a) : isFinite(a) || mn(o, a));
+ o.indexOf("-") > -1 ? Sa(o) : _r.test(o) ? wa(o) : mo.test(a) && xa(o, a),
+ typeof a == "number" && (isNaN(a) ? ka(o, a) : isFinite(a) || mn(o, a));
};
}
var yo = ur,
@@ -12490,7 +11181,7 @@ var Wd = an((Pc) => {
((So = !0),
c(
"A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",
- JSON.stringify(o)
+ JSON.stringify(o),
));
}
var _a = Array.isArray;
@@ -12515,8 +11206,7 @@ var Wd = an((Pc) => {
u = [];
if ((f !== void 0 && u.push(l, yn(f), kt), d !== void 0))
for (var p = 0; p < d.length; p++) u.push(Ar, be(d[p]), fr);
- if (t !== void 0)
- for (var g = 0; g < t.length; g++) u.push(Dr, be(t[g]), fr);
+ if (t !== void 0) for (var g = 0; g < t.length; g++) u.push(Dr, be(t[g]), fr);
return {
bootstrapChunks: u,
startInlineScript: l,
@@ -12542,12 +11232,7 @@ var Wd = an((Pc) => {
return { insertionMode: o, selectedValue: a };
}
function wn(o) {
- var a =
- o === "http://www.w3.org/2000/svg"
- ? Wt
- : o === "http://www.w3.org/1998/Math/MathML"
- ? zt
- : Ht;
+ var a = o === "http://www.w3.org/2000/svg" ? Wt : o === "http://www.w3.org/1998/Math/MathML" ? zt : Ht;
return Ee(a, null);
}
function Mr(o, a, f) {
@@ -12571,9 +11256,7 @@ var Wd = an((Pc) => {
case "tr":
return Ee(bn, null);
}
- return o.insertionMode >= Et || o.insertionMode === Ht
- ? Ee(Ct, null)
- : o;
+ return o.insertionMode >= Et || o.insertionMode === Ht ? Ee(Ct, null) : o;
}
var Lr = null;
function Br(o) {
@@ -12608,7 +11291,7 @@ var Wd = an((Pc) => {
function vr(o, a, f) {
if (typeof f != "object")
throw new Error(
- "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
+ "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.",
);
var d = !0;
for (var t in f)
@@ -12649,13 +11332,7 @@ var Wd = an((Pc) => {
case "suppressHydrationWarning":
return;
}
- if (
- !(
- f.length > 2 &&
- (f[0] === "o" || f[0] === "O") &&
- (f[1] === "n" || f[1] === "N")
- )
- ) {
+ if (!(f.length > 2 && (f[0] === "o" || f[0] === "O") && (f[1] === "n" || f[1] === "N"))) {
var t = uo(f);
if (t !== null) {
switch (typeof d) {
@@ -12672,9 +11349,7 @@ var Wd = an((Pc) => {
d && o.push(Ze, l, Ur);
return;
case Le:
- d === !0
- ? o.push(Ze, l, Ur)
- : d === !1 || o.push(Ze, l, _t, be(d), vt);
+ d === !0 ? o.push(Ze, l, Ur) : d === !1 || o.push(Ze, l, _t, be(d), vt);
return;
case er:
isNaN(d) || o.push(Ze, l, _t, be(d), vt);
@@ -12683,8 +11358,7 @@ var Wd = an((Pc) => {
!isNaN(d) && d >= 1 && o.push(Ze, l, _t, be(d), vt);
break;
default:
- t.sanitizeURL && (Lt(d, r), (d = "" + d), Ia(d)),
- o.push(Ze, l, _t, be(d), vt);
+ t.sanitizeURL && (Lt(d, r), (d = "" + d), Ia(d)), o.push(Ze, l, _t, be(d), vt);
}
} else if (St(f)) {
switch (typeof d) {
@@ -12704,13 +11378,10 @@ var Wd = an((Pc) => {
xn = F("/>");
function gr(o, a, f) {
if (a != null) {
- if (f != null)
- throw new Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (f != null) throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof a != "object" || !("__html" in a))
throw new Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
var d = a.__html;
d != null && (Me(d), o.push("" + d));
@@ -12729,16 +11400,10 @@ var Wd = an((Pc) => {
if (f != null) {
var d = cr(f);
o.multiple && !d
- ? c(
- "The `%s` prop supplied to <select> must be an array if `multiple` is true.",
- a
- )
+ ? c("The `%s` prop supplied to <select> must be an array if `multiple` is true.", a)
: !o.multiple &&
d &&
- c(
- "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",
- a
- );
+ c("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.", a);
}
}
}
@@ -12750,7 +11415,7 @@ var Wd = an((Pc) => {
a.defaultValue !== void 0 &&
!Tn &&
(c(
- "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"
+ "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components",
),
(Tn = !0)),
o.push(T("select"));
@@ -12788,7 +11453,7 @@ var Wd = an((Pc) => {
typeof f != "number" &&
((ko = !0),
c(
- "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
+ "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.",
)));
}),
a
@@ -12814,7 +11479,7 @@ var Wd = an((Pc) => {
(u = y),
Cn ||
(c(
- "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
+ "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.",
),
(Cn = !0));
break;
@@ -12837,7 +11502,7 @@ var Wd = an((Pc) => {
(To ||
((To = !0),
c(
- "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
+ "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.",
))),
(w = gt(r))),
cr(t))
@@ -12862,7 +11527,7 @@ var Wd = an((Pc) => {
(c(
"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",
"A component",
- a.type
+ a.type,
),
(kn = !0)),
a.value !== void 0 &&
@@ -12871,7 +11536,7 @@ var Wd = an((Pc) => {
(c(
"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",
"A component",
- a.type
+ a.type,
),
(jr = !0)),
o.push(T("input"));
@@ -12887,7 +11552,7 @@ var Wd = an((Pc) => {
case "children":
case "dangerouslySetInnerHTML":
throw new Error(
- "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
case "defaultChecked":
l = p;
@@ -12907,12 +11572,8 @@ var Wd = an((Pc) => {
}
}
return (
- r !== null
- ? Re(o, f, "checked", r)
- : l !== null && Re(o, f, "checked", l),
- d !== null
- ? Re(o, f, "value", d)
- : t !== null && Re(o, f, "value", t),
+ r !== null ? Re(o, f, "checked", r) : l !== null && Re(o, f, "checked", l),
+ d !== null ? Re(o, f, "value", d) : t !== null && Re(o, f, "value", t),
o.push(xn),
null
);
@@ -12923,7 +11584,7 @@ var Wd = an((Pc) => {
a.defaultValue !== void 0 &&
!xo &&
(c(
- "Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"
+ "Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",
),
(xo = !0)),
o.push(T("textarea"));
@@ -12945,27 +11606,17 @@ var Wd = an((Pc) => {
t = u;
break;
case "dangerouslySetInnerHTML":
- throw new Error(
- "`dangerouslySetInnerHTML` does not make sense on <textarea>."
- );
+ throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
default:
Re(o, f, l, u);
break;
}
}
if ((d === null && t !== null && (d = t), o.push(Je), r != null)) {
- if (
- (c(
- "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
- ),
- d != null)
- )
- throw new Error(
- "If you supply `defaultValue` on a <textarea>, do not pass children."
- );
+ if ((c("Use the `defaultValue` or `value` props instead of setting children on <textarea>."), d != null))
+ throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
if (cr(r)) {
- if (r.length > 1)
- throw new Error("<textarea> can only have at most one child.");
+ if (r.length > 1) throw new Error("<textarea> can only have at most one child.");
Me(r[0]), (d = "" + r[0]);
}
Me(r), (d = "" + r);
@@ -12990,8 +11641,7 @@ var Wd = an((Pc) => {
case "children":
case "dangerouslySetInnerHTML":
throw new Error(
- f +
- " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
+ f + " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.",
);
default:
Re(o, d, t, r);
@@ -13009,9 +11659,7 @@ var Wd = an((Pc) => {
switch (d) {
case "children":
case "dangerouslySetInnerHTML":
- throw new Error(
- "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
- );
+ throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");
default:
Re(o, f, d, t);
break;
@@ -13031,9 +11679,7 @@ var Wd = an((Pc) => {
d = r;
break;
case "dangerouslySetInnerHTML":
- throw new Error(
- "`dangerouslySetInnerHTML` does not make sense on <title>."
- );
+ throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");
default:
Re(o, f, t, r);
break;
@@ -13044,17 +11690,17 @@ var Wd = an((Pc) => {
var l = Array.isArray(d) && d.length < 2 ? d[0] || null : d;
Array.isArray(d) && d.length > 1
? c(
- "A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"
+ "A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering",
)
: l != null && l.$$typeof != null
? c(
- "A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"
+ "A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering",
)
: l != null &&
typeof l != "string" &&
typeof l != "number" &&
c(
- "A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"
+ "A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering",
);
}
return d;
@@ -13079,11 +11725,7 @@ var Wd = an((Pc) => {
break;
}
}
- return (
- o.push(Je),
- gr(o, r, t),
- typeof t == "string" ? (o.push(We(t)), null) : t
- );
+ return o.push(Je), gr(o, r, t), typeof t == "string" ? (o.push(We(t)), null) : t;
}
function Da(o, a, f, d) {
o.push(T(f));
@@ -13107,10 +11749,7 @@ var Wd = an((Pc) => {
case "suppressHydrationWarning":
break;
default:
- St(l) &&
- typeof u != "function" &&
- typeof u != "symbol" &&
- o.push(Ze, l, _t, be(u), vt);
+ St(l) && typeof u != "function" && typeof u != "symbol" && o.push(Ze, l, _t, be(u), vt);
break;
}
}
@@ -13139,13 +11778,10 @@ var Wd = an((Pc) => {
}
}
if ((o.push(Je), r != null)) {
- if (t != null)
- throw new Error(
- "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
- );
+ if (t != null) throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
if (typeof r != "object" || !("__html" in r))
throw new Error(
- "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."
+ "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
);
var p = r.__html;
p != null &&
@@ -13186,7 +11822,7 @@ var Wd = an((Pc) => {
f.contentEditable &&
f.children != null &&
c(
- "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."
+ "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.",
),
t.insertionMode !== Wt &&
t.insertionMode !== zt &&
@@ -13195,7 +11831,7 @@ var Wd = an((Pc) => {
a.toLowerCase() !== a &&
c(
"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
- a
+ a,
),
a)
) {
@@ -13241,9 +11877,7 @@ var Wd = an((Pc) => {
case "html":
return t.insertionMode === Ht && o.push(I), In(o, f, a, d);
default:
- return a.indexOf("-") === -1 && typeof f.is != "string"
- ? In(o, f, a, d)
- : Da(o, f, a, d);
+ return a.indexOf("-") === -1 && typeof f.is != "string" ? In(o, f, a, d) : Da(o, f, a, d);
}
}
var M = F("</"),
@@ -13271,8 +11905,7 @@ var Wd = an((Pc) => {
}
}
function Y(o, a) {
- for (var f = a.bootstrapChunks, d = 0; d < f.length - 1; d++)
- P(o, f[d]);
+ for (var f = a.bootstrapChunks, d = 0; d < f.length - 1; d++) P(o, f[d]);
return d < f.length ? W(o, f[d]) : !0;
}
var Q = F('<template id="'),
@@ -13298,9 +11931,7 @@ var Wd = an((Pc) => {
}
function Ni(o, a, f) {
if ((P(o, Se), f === null))
- throw new Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw new Error("An ID must have been assigned before we can complete the boundary.");
return P(o, f), W(o, yr);
}
function ms(o, a, f, d, t) {
@@ -13349,33 +11980,19 @@ var Wd = an((Pc) => {
switch (f.insertionMode) {
case Ht:
case Ct:
- return (
- P(o, Ss), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, ws)
- );
+ return P(o, Ss), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, ws);
case Wt:
- return (
- P(o, ks), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ts)
- );
+ return P(o, ks), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ts);
case zt:
- return (
- P(o, Es), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Rs)
- );
+ return P(o, Es), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Rs);
case Et:
- return (
- P(o, _s), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ps)
- );
+ return P(o, _s), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ps);
case dr:
- return (
- P(o, As), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ds)
- );
+ return P(o, As), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ds);
case bn:
- return (
- P(o, Ms), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ls)
- );
+ return P(o, Ms), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, Ls);
case Sn:
- return (
- P(o, Us), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, js)
- );
+ return P(o, Us), P(o, a.segmentPrefix), P(o, d.toString(16)), W(o, js);
default:
throw new Error("Unknown insertion mode. This is a bug in React.");
}
@@ -13413,9 +12030,7 @@ var Wd = an((Pc) => {
Zs = F('")</script>');
function La(o, a, f) {
P(o, a.startInlineScript),
- a.sentCompleteSegmentFunction
- ? P(o, Gs)
- : ((a.sentCompleteSegmentFunction = !0), P(o, Ys)),
+ a.sentCompleteSegmentFunction ? P(o, Gs) : ((a.sentCompleteSegmentFunction = !0), P(o, Ys)),
P(o, a.segmentPrefix);
var d = f.toString(16);
return P(o, d), P(o, Xs), P(o, a.placeholderPrefix), P(o, d), W(o, Zs);
@@ -13427,14 +12042,10 @@ var Wd = an((Pc) => {
function Gi(o, a, f, d) {
if (
(P(o, a.startInlineScript),
- a.sentCompleteBoundaryFunction
- ? P(o, Qs)
- : ((a.sentCompleteBoundaryFunction = !0), P(o, Js)),
+ a.sentCompleteBoundaryFunction ? P(o, Qs) : ((a.sentCompleteBoundaryFunction = !0), P(o, Js)),
f === null)
)
- throw new Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw new Error("An ID must have been assigned before we can complete the boundary.");
var t = d.toString(16);
return P(o, f), P(o, Ba), P(o, a.segmentPrefix), P(o, t), W(o, Yi);
}
@@ -13446,14 +12057,10 @@ var Wd = an((Pc) => {
function eu(o, a, f, d, t, r) {
if (
(P(o, a.startInlineScript),
- a.sentClientRenderFunction
- ? P(o, Zi)
- : ((a.sentClientRenderFunction = !0), P(o, Xi)),
+ a.sentClientRenderFunction ? P(o, Zi) : ((a.sentClientRenderFunction = !0), P(o, Xi)),
f === null)
)
- throw new Error(
- "An ID must have been assigned before we can complete the boundary."
- );
+ throw new Error("An ID must have been assigned before we can complete the boundary.");
return (
P(o, f),
P(o, Ks),
@@ -13476,7 +12083,7 @@ var Wd = an((Pc) => {
return "\\u2029";
default:
throw new Error(
- "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
+ "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React",
);
}
});
@@ -13519,7 +12126,7 @@ var Wd = an((Pc) => {
if (
(typeof o.tag == "number" &&
c(
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.",
),
typeof o == "function")
)
@@ -13618,10 +12225,7 @@ var Wd = an((Pc) => {
groupEnd: ze({}, o, { value: el }),
});
}
- Vr < 0 &&
- c(
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
- );
+ Vr < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var br = s.ReactCurrentDispatcher,
@@ -13718,9 +12322,7 @@ var Wd = an((Pc) => {
`
` + u[g].replace(" at new ", " at ");
return (
- o.displayName &&
- w.includes("<anonymous>") &&
- (w = w.replace("<anonymous>", o.displayName)),
+ o.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", o.displayName)),
typeof o == "function" && Yr.set(o, w),
w
);
@@ -13798,18 +12400,11 @@ var Wd = an((Pc) => {
l +
"` is invalid; it must be a function, usually from the `prop-types` package, but received `" +
typeof o[l] +
- "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
+ "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.",
);
throw ((p.name = "Invariant Violation"), p);
}
- u = o[l](
- a,
- l,
- d,
- f,
- null,
- "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"
- );
+ u = o[l](a, l, d, f, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (g) {
u = g;
}
@@ -13821,15 +12416,12 @@ var Wd = an((Pc) => {
d || "React class",
f,
l,
- typeof u
+ typeof u,
),
Gr(null)),
u instanceof Error &&
!(u.message in Ln) &&
- ((Ln[u.message] = !0),
- Gr(t),
- c("Failed %s type: %s", f, u.message),
- Gr(null));
+ ((Ln[u.message] = !0), Gr(t), c("Failed %s type: %s", f, u.message), Gr(null));
}
}
}
@@ -13860,7 +12452,7 @@ var Wd = an((Pc) => {
c(
"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",
t,
- t
+ t,
));
}
return f;
@@ -13869,10 +12461,7 @@ var Wd = an((Pc) => {
for (var l in r)
if (!(l in d))
throw new Error(
- (ne(a) || "Unknown") +
- '.getChildContext(): key "' +
- l +
- '" is not defined in childContextTypes.'
+ (ne(a) || "Unknown") + '.getChildContext(): key "' + l + '" is not defined in childContextTypes.',
);
{
var u = ne(a) || "Unknown";
@@ -13897,15 +12486,9 @@ var Wd = an((Pc) => {
var f = o.parent,
d = a.parent;
if (f === null) {
- if (d !== null)
- throw new Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (d !== null) throw new Error("The stacks must reach the root at the same time. This is a bug in React.");
} else {
- if (d === null)
- throw new Error(
- "The stacks must reach the root at the same time. This is a bug in React."
- );
+ if (d === null) throw new Error("The stacks must reach the root at the same time. This is a bug in React.");
Un(f, d);
}
Mo(a);
@@ -13924,17 +12507,13 @@ var Wd = an((Pc) => {
Zr(o);
var f = o.parent;
if (f === null)
- throw new Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
+ throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
f.depth === a.depth ? Un(f, a) : jn(f, a);
}
function nl(o, a) {
var f = a.parent;
if (f === null)
- throw new Error(
- "The depth must equal at least at zero before reaching the root. This is a bug in React."
- );
+ throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
o.depth === f.depth ? Un(o, f) : nl(o, f), Mo(a);
}
function Lo(o) {
@@ -13960,7 +12539,7 @@ var Wd = an((Pc) => {
o._currentRenderer !== null &&
o._currentRenderer !== nt &&
c(
- "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
+ "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.",
),
(o._currentRenderer = nt);
var d = Ft,
@@ -13975,24 +12554,16 @@ var Wd = an((Pc) => {
}
function Hn(o) {
var a = Ft;
- if (a === null)
- throw new Error(
- "Tried to pop a Context at the root of the app. This is a bug in React."
- );
- a.context !== o &&
- c(
- "The parent context is not the expected context. This is probably a bug in React."
- );
+ if (a === null) throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");
+ a.context !== o && c("The parent context is not the expected context. This is probably a bug in React.");
{
var f = a.parentValue;
- f === nu
- ? (a.context._currentValue = a.context._defaultValue)
- : (a.context._currentValue = f),
+ f === nu ? (a.context._currentValue = a.context._defaultValue) : (a.context._currentValue = f),
o._currentRenderer !== void 0 &&
o._currentRenderer !== null &&
o._currentRenderer !== nt &&
c(
- "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
+ "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.",
),
(o._currentRenderer = nt);
}
@@ -14039,7 +12610,7 @@ var Wd = an((Pc) => {
c(
"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",
a,
- o
+ o,
));
}
}),
@@ -14050,7 +12621,7 @@ var Wd = an((Pc) => {
(Jr.add(f),
c(
"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
- f
+ f,
));
}
});
@@ -14067,7 +12638,7 @@ var Wd = an((Pc) => {
Please check the code for the %s component.`,
a,
a,
- d
+ d,
),
(Uo[t] = !0);
}
@@ -14078,9 +12649,7 @@ Please check the code for the %s component.`,
},
enqueueSetState: function (o, a, f) {
var d = Bo(o);
- d.queue === null
- ? al(o, "setState")
- : (d.queue.push(a), f != null && Qr(f, "setState"));
+ d.queue === null ? al(o, "setState") : (d.queue.push(a), f != null && Qr(f, "setState"));
},
enqueueReplaceState: function (o, a, f) {
var d = Bo(o);
@@ -14088,9 +12657,7 @@ Please check the code for the %s component.`,
},
enqueueForceUpdate: function (o, a) {
var f = Bo(o);
- f.queue === null
- ? al(o, "forceUpdate")
- : a != null && Qr(a, "setState");
+ f.queue === null ? al(o, "forceUpdate") : a != null && Qr(a, "setState");
},
};
function uu(o, a, f, d, t) {
@@ -14103,9 +12670,7 @@ Please check the code for the %s component.`,
var d = Oo,
t = o.contextType;
if ("contextType" in o) {
- var r =
- t === null ||
- (t !== void 0 && t.$$typeof === An && t._context === void 0);
+ var r = t === null || (t !== void 0 && t.$$typeof === An && t._context === void 0);
if (!r && !$o.has(o)) {
$o.add(o);
var l = "";
@@ -14118,24 +12683,18 @@ Please check the code for the %s component.`,
? (l = " Did you accidentally pass the Context.Provider instead?")
: t._context !== void 0
? (l = " Did you accidentally pass the Context.Consumer instead?")
- : (l =
- " However, it is set to an object with keys {" +
- Object.keys(t).join(", ") +
- "}."),
+ : (l = " However, it is set to an object with keys {" + Object.keys(t).join(", ") + "}."),
c(
"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
ne(o) || "Component",
- l
+ l,
);
}
}
typeof t == "object" && t !== null ? (d = Wn(t)) : (d = f);
var u = new o(a, d);
{
- if (
- typeof o.getDerivedStateFromProps == "function" &&
- (u.state === null || u.state === void 0)
- ) {
+ if (typeof o.getDerivedStateFromProps == "function" && (u.state === null || u.state === void 0)) {
var p = ne(o) || "Component";
zn.has(p) ||
(zn.add(p),
@@ -14143,32 +12702,24 @@ Please check the code for the %s component.`,
"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",
p,
u.state === null ? "null" : "undefined",
- p
+ p,
));
}
- if (
- typeof o.getDerivedStateFromProps == "function" ||
- typeof u.getSnapshotBeforeUpdate == "function"
- ) {
+ if (typeof o.getDerivedStateFromProps == "function" || typeof u.getSnapshotBeforeUpdate == "function") {
var g = null,
y = null,
w = null;
if (
- (typeof u.componentWillMount == "function" &&
- u.componentWillMount.__suppressDeprecationWarning !== !0
+ (typeof u.componentWillMount == "function" && u.componentWillMount.__suppressDeprecationWarning !== !0
? (g = "componentWillMount")
- : typeof u.UNSAFE_componentWillMount == "function" &&
- (g = "UNSAFE_componentWillMount"),
+ : typeof u.UNSAFE_componentWillMount == "function" && (g = "UNSAFE_componentWillMount"),
typeof u.componentWillReceiveProps == "function" &&
u.componentWillReceiveProps.__suppressDeprecationWarning !== !0
? (y = "componentWillReceiveProps")
- : typeof u.UNSAFE_componentWillReceiveProps == "function" &&
- (y = "UNSAFE_componentWillReceiveProps"),
- typeof u.componentWillUpdate == "function" &&
- u.componentWillUpdate.__suppressDeprecationWarning !== !0
+ : typeof u.UNSAFE_componentWillReceiveProps == "function" && (y = "UNSAFE_componentWillReceiveProps"),
+ typeof u.componentWillUpdate == "function" && u.componentWillUpdate.__suppressDeprecationWarning !== !0
? (w = "componentWillUpdate")
- : typeof u.UNSAFE_componentWillUpdate == "function" &&
- (w = "UNSAFE_componentWillUpdate"),
+ : typeof u.UNSAFE_componentWillUpdate == "function" && (w = "UNSAFE_componentWillUpdate"),
g !== null || y !== null || w !== null)
) {
var C = ne(o) || "Component",
@@ -14198,7 +12749,7 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
w !== null
? `
` + w
- : ""
+ : "",
));
}
}
@@ -14213,39 +12764,39 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
(a.prototype && typeof a.prototype.render == "function"
? c(
"%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",
- d
+ d,
)
: c(
"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",
- d
+ d,
)),
o.getInitialState &&
!o.getInitialState.isReactClassApproved &&
!o.state &&
c(
"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",
- d
+ d,
),
o.getDefaultProps &&
!o.getDefaultProps.isReactClassApproved &&
c(
"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
- d
+ d,
),
o.propTypes &&
c(
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",
- d
+ d,
),
o.contextType &&
c(
"contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
- d
+ d,
),
o.contextTypes &&
c(
"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",
- d
+ d,
),
a.contextType &&
a.contextTypes &&
@@ -14253,39 +12804,36 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
(zo.add(a),
c(
"%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",
- d
+ d,
)),
typeof o.componentShouldUpdate == "function" &&
c(
"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",
- d
+ d,
),
a.prototype &&
a.prototype.isPureReactComponent &&
typeof o.shouldComponentUpdate < "u" &&
c(
"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
- ne(a) || "A pure component"
+ ne(a) || "A pure component",
),
typeof o.componentDidUnmount == "function" &&
c(
"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
- d
+ d,
),
typeof o.componentDidReceiveProps == "function" &&
c(
"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",
- d
+ d,
),
typeof o.componentWillRecieveProps == "function" &&
- c(
- "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
- d
- ),
+ c("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", d),
typeof o.UNSAFE_componentWillRecieveProps == "function" &&
c(
"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
- d
+ d,
);
var r = o.props !== f;
o.props !== void 0 &&
@@ -14293,13 +12841,13 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
c(
"%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
d,
- d
+ d,
),
o.defaultProps &&
c(
"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
d,
- d
+ d,
),
typeof o.getSnapshotBeforeUpdate == "function" &&
typeof o.componentDidUpdate != "function" &&
@@ -14307,33 +12855,28 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
($n.add(a),
c(
"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
- ne(a)
+ ne(a),
)),
typeof o.getDerivedStateFromProps == "function" &&
c(
"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
- d
+ d,
),
typeof o.getDerivedStateFromError == "function" &&
c(
"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
- d
+ d,
),
typeof a.getSnapshotBeforeUpdate == "function" &&
c(
"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
- d
+ d,
);
var l = o.state;
- l &&
- (typeof l != "object" || cr(l)) &&
- c("%s.state: must be set to an object or null", d),
+ l && (typeof l != "object" || cr(l)) && c("%s.state: must be set to an object or null", d),
typeof o.getChildContext == "function" &&
typeof a.childContextTypes != "object" &&
- c(
- "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
- d
- );
+ c("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", d);
}
}
function ll(o, a) {
@@ -14348,18 +12891,17 @@ https://reactjs.org/link/unsafe-component-lifecycles`,
* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
Please update the following components: %s`,
- d
+ d,
),
(jo[d] = !0));
}
a.componentWillMount();
}
- typeof a.UNSAFE_componentWillMount == "function" &&
- a.UNSAFE_componentWillMount(),
+ typeof a.UNSAFE_componentWillMount == "function" && a.UNSAFE_componentWillMount(),
f !== a.state &&
(c(
"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
- ne(o) || "Component"
+ ne(o) || "Component",
),
il.enqueueReplaceState(a, a.state, null));
}
@@ -14367,14 +12909,9 @@ Please update the following components: %s`,
if (o.queue !== null && o.queue.length > 0) {
var t = o.queue,
r = o.replace;
- if (((o.queue = null), (o.replace = !1), r && t.length === 1))
- a.state = t[0];
+ if (((o.queue = null), (o.replace = !1), r && t.length === 1)) a.state = t[0];
else {
- for (
- var l = r ? t[0] : a.state, u = !0, p = r ? 1 : 0;
- p < t.length;
- p++
- ) {
+ for (var l = r ? t[0] : a.state, u = !0, p = r ? 1 : 0; p < t.length; p++) {
var g = t[p],
y = typeof g == "function" ? g.call(a, l, f, d) : g;
y != null && (u ? ((u = !1), (l = ze({}, l, y))) : ze(l, y));
@@ -14390,26 +12927,20 @@ Please update the following components: %s`,
var r = { queue: [], replace: !1 };
ol(o, r);
var l = a.contextType;
- if (
- (typeof l == "object" && l !== null
- ? (o.context = Wn(l))
- : (o.context = d),
- o.state === f)
- ) {
+ if ((typeof l == "object" && l !== null ? (o.context = Wn(l)) : (o.context = d), o.state === f)) {
var u = ne(a) || "Component";
Nn.has(u) ||
(Nn.add(u),
c(
"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
- u
+ u,
));
}
var p = a.getDerivedStateFromProps;
typeof p == "function" && (o.state = uu(o, a, p, t, f)),
typeof a.getDerivedStateFromProps != "function" &&
typeof o.getSnapshotBeforeUpdate != "function" &&
- (typeof o.UNSAFE_componentWillMount == "function" ||
- typeof o.componentWillMount == "function") &&
+ (typeof o.UNSAFE_componentWillMount == "function" || typeof o.componentWillMount == "function") &&
(ll(a, o), du(r, o, f, d));
}
var oi = { id: 1, overflow: "" };
@@ -14458,9 +12989,7 @@ Please update the following components: %s`,
return a === 0 ? 32 : (31 - ((vu(a) / gu) | 0)) | 0;
}
function At(o, a) {
- return (
- (o === a && (o !== 0 || 1 / o === 1 / a)) || (o !== o && a !== a)
- );
+ return (o === a && (o !== 0 || 1 / o === 1 / a)) || (o !== o && a !== a);
}
var ii = typeof Object.is == "function" ? Object.is : At,
Ke = null,
@@ -14485,7 +13014,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return (
Ie &&
c(
- "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks"
+ "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks",
),
Ke
);
@@ -14495,7 +13024,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
return (
c(
"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
- qr
+ qr,
),
!1
);
@@ -14507,17 +13036,13 @@ Previous: %s
Incoming: %s`,
qr,
"[" + o.join(", ") + "]",
- "[" + a.join(", ") + "]"
+ "[" + a.join(", ") + "]",
);
- for (var f = 0; f < a.length && f < o.length; f++)
- if (!ii(o[f], a[f])) return !1;
+ for (var f = 0; f < a.length && f < o.length; f++) if (!ii(o[f], a[f])) return !1;
return !0;
}
function ul() {
- if ($e > 0)
- throw new Error(
- "Rendered more hooks than during the previous render"
- );
+ if ($e > 0) throw new Error("Rendered more hooks than during the previous render");
return { memoizedState: null, queue: null, next: null };
}
function si() {
@@ -14544,20 +13069,13 @@ Incoming: %s`,
return o;
}
function ci() {
- (Ie = !1),
- (Ke = null),
- (X = null),
- (ot = !1),
- (Vt = null),
- ($e = 0),
- (Gt = null),
- (G = null);
+ (Ie = !1), (Ke = null), (X = null), (ot = !1), (Vt = null), ($e = 0), (Gt = null), (G = null);
}
function fi(o) {
return (
Ie &&
c(
- "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
+ "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().",
),
Wn(o)
);
@@ -14592,9 +13110,7 @@ Incoming: %s`,
} else {
Ie = !0;
var g;
- o === Yo
- ? (g = typeof a == "function" ? a() : a)
- : (g = f !== void 0 ? f(a) : a),
+ o === Yo ? (g = typeof a == "function" ? a() : a) : (g = f !== void 0 ? f(a) : a),
(Ie = !1),
(G.memoizedState = g);
var y = (G.queue = { last: null, dispatch: null }),
@@ -14627,14 +13143,12 @@ Incoming: %s`,
function Su(o, a) {
(qr = "useLayoutEffect"),
c(
- "useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes."
+ "useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.",
);
}
function wu(o, a, f) {
if ($e >= Kr)
- throw new Error(
- "Too many re-renders. React limits the number of renders to prevent an infinite loop."
- );
+ throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
if (o === Ke) {
ot = !0;
var d = { action: f, next: null };
@@ -14658,7 +13172,7 @@ Incoming: %s`,
function Tu(o, a, f) {
if (f === void 0)
throw new Error(
- "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
+ "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.",
);
return f();
}
@@ -14666,9 +13180,7 @@ Incoming: %s`,
return Xt(), o;
}
function Eu() {
- throw new Error(
- "startTransition cannot be called during server rendering."
- );
+ throw new Error("startTransition cannot be called during server rendering.");
}
function Go() {
return Xt(), [!1, Eu];
@@ -14678,9 +13190,7 @@ Incoming: %s`,
a = No(o.treeContext),
f = pi;
if (f === null)
- throw new Error(
- "Invalid hook call. Hooks can only be called inside of the body of a function component."
- );
+ throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");
var d = Sr++;
return wo(f, a, d);
}
@@ -14804,8 +13314,7 @@ Error generating stack: ` +
};
}
function at(o, a, f, d, t, r, l, u) {
- o.allPendingTasks++,
- f === null ? o.pendingRootTasks++ : f.pendingTasks++;
+ o.allPendingTasks++, f === null ? o.pendingRootTasks++ : f.pendingTasks++;
var p = {
node: a,
ping: function () {
@@ -14836,9 +13345,7 @@ Error generating stack: ` +
}
var Ne = null;
function Qo() {
- return Ne === null || Ne.componentStack === null
- ? ""
- : hi(Ne.componentStack);
+ return Ne === null || Ne.componentStack === null ? "" : hi(Ne.componentStack);
}
function Xn(o, a) {
o.componentStack = { tag: 0, parent: o.componentStack, type: a };
@@ -14851,20 +13358,14 @@ Error generating stack: ` +
}
function mt(o) {
o.componentStack === null
- ? c(
- "Unexpectedly popped too many stack frames. This is a bug in React."
- )
+ ? c("Unexpectedly popped too many stack frames. This is a bug in React.")
: (o.componentStack = o.componentStack.parent);
}
var Ot = null;
function on(o, a) {
{
var f;
- typeof a == "string"
- ? (f = a)
- : a && typeof a.message == "string"
- ? (f = a.message)
- : (f = String(a));
+ typeof a == "string" ? (f = a) : a && typeof a.message == "string" ? (f = a.message) : (f = String(a));
var d = Ot || Qo();
(Ot = null), (o.errorMessage = f), (o.errorComponentStack = d);
}
@@ -14875,7 +13376,7 @@ Error generating stack: ` +
throw new Error(
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' +
typeof f +
- '" instead'
+ '" instead',
);
return f;
}
@@ -14883,10 +13384,7 @@ Error generating stack: ` +
var f = o.onShellError;
f(a);
var d = o.onFatalError;
- d(a),
- o.destination !== null
- ? ((o.status = rn), ct(o.destination, a))
- : ((o.status = ml), (o.fatalError = a));
+ d(a), o.destination !== null ? ((o.status = rn), ct(o.destination, a)) : ((o.status = ml), (o.fatalError = a));
}
function Iu(o, a, f) {
Xn(a, "Suspense");
@@ -14913,10 +13411,7 @@ Error generating stack: ` +
return;
}
} catch (_) {
- (w.status = gi),
- (p.forceClientRender = !0),
- (p.errorDigest = Jn(o, _)),
- on(p, _);
+ (w.status = gi), (p.forceClientRender = !0), (p.errorDigest = Jn(o, _)), on(p, _);
} finally {
(a.blockedBoundary = d), (a.blockedSegment = t);
}
@@ -14951,7 +13446,7 @@ Error generating stack: ` +
(xi ||
c(
"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
- ne(d) || "a component"
+ ne(d) || "a component",
),
(xi = !0));
{
@@ -14981,44 +13476,30 @@ Error generating stack: ` +
kl = !1;
function Tl(o, a, f, d) {
var t;
- if (
- ((t = Xr(f, a.legacyContext)),
- Dt(a, f),
- f.prototype && typeof f.prototype.render == "function")
- ) {
+ if (((t = Xr(f, a.legacyContext)), Dt(a, f), f.prototype && typeof f.prototype.render == "function")) {
var r = ne(f) || "Unknown";
bi[r] ||
(c(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",
r,
- r
+ r,
),
(bi[r] = !0));
}
var l = wl(o, a, f, d, t),
u = fl();
- if (
- typeof l == "object" &&
- l !== null &&
- typeof l.render == "function" &&
- l.$$typeof === void 0
- ) {
+ if (typeof l == "object" && l !== null && typeof l.render == "function" && l.$$typeof === void 0) {
var p = ne(f) || "Unknown";
Qn[p] ||
(c(
"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",
p,
p,
- p
+ p,
),
(Qn[p] = !0));
}
- if (
- typeof l == "object" &&
- l !== null &&
- typeof l.render == "function" &&
- l.$$typeof === void 0
- ) {
+ if (typeof l == "object" && l !== null && typeof l.render == "function" && l.$$typeof === void 0) {
{
var g = ne(f) || "Unknown";
Qn[g] ||
@@ -15026,7 +13507,7 @@ Error generating stack: ` +
"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",
g,
g,
- g
+ g,
),
(Qn[g] = !0));
}
@@ -15051,23 +13532,16 @@ Error generating stack: ` +
o.childContextTypes &&
c(
"%s(...): childContextTypes cannot be defined on a function component.",
- o.displayName || o.name || "Component"
+ o.displayName || o.name || "Component",
),
typeof o.getDerivedStateFromProps == "function")
) {
var a = ne(o) || "Unknown";
- wi[a] ||
- (c(
- "%s: Function components do not support getDerivedStateFromProps.",
- a
- ),
- (wi[a] = !0));
+ wi[a] || (c("%s: Function components do not support getDerivedStateFromProps.", a), (wi[a] = !0));
}
if (typeof o.contextType == "object" && o.contextType !== null) {
var f = ne(o) || "Unknown";
- Si[f] ||
- (c("%s: Function components do not support contextType.", f),
- (Si[f] = !0));
+ Si[f] || (c("%s: Function components do not support contextType.", f), (Si[f] = !0));
}
}
}
@@ -15108,13 +13582,13 @@ Error generating stack: ` +
(kl ||
((kl = !0),
c(
- "Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"
+ "Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?",
)))
: (f = f._context);
var t = d.children;
typeof t != "function" &&
c(
- "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
+ "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.",
);
var r = Wn(f),
l = t(r);
@@ -15130,9 +13604,7 @@ Error generating stack: ` +
Ue(o, a, l),
(a.context = Hn(t)),
u !== a.context &&
- c(
- "Popping the context provider did not return back to the original snapshot. This is a bug in React."
- );
+ c("Popping the context provider did not return back to the original snapshot. This is a bug in React.");
}
function Du(o, a, f, d, t) {
Xn(a, "Lazy");
@@ -15169,9 +13641,7 @@ Error generating stack: ` +
return;
}
case tu:
- throw new Error(
- "ReactDOMServer does not yet support scope components."
- );
+ throw new Error("ReactDOMServer does not yet support scope components.");
case On: {
Iu(o, a, d);
return;
@@ -15202,15 +13672,12 @@ Error generating stack: ` +
}
var r = "";
throw (
- ((f === void 0 ||
- (typeof f == "object" &&
- f !== null &&
- Object.keys(f).length === 0)) &&
+ ((f === void 0 || (typeof f == "object" && f !== null && Object.keys(f).length === 0)) &&
(r +=
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),
new Error(
"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) " +
- ("but got: " + (f == null ? f : typeof f) + "." + r)
+ ("but got: " + (f == null ? f : typeof f) + "." + r),
))
);
}
@@ -15219,14 +13686,11 @@ Error generating stack: ` +
o[Symbol.toStringTag] === "Generator" &&
(ki ||
c(
- "Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."
+ "Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.",
),
(ki = !0)),
o.entries === a &&
- (xl ||
- c(
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
- ),
+ (xl || c("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),
(xl = !0));
}
function Ue(o, a, f) {
@@ -15234,11 +13698,7 @@ Error generating stack: ` +
return Mu(o, a, f);
} catch (d) {
throw (
- ((typeof d == "object" &&
- d !== null &&
- typeof d.then == "function") ||
- (Ot = Ot !== null ? Ot : Qo()),
- d)
+ ((typeof d == "object" && d !== null && typeof d.then == "function") || (Ot = Ot !== null ? Ot : Qo()), d)
);
}
}
@@ -15255,7 +13715,7 @@ Error generating stack: ` +
}
case Ha:
throw new Error(
- "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
+ "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.",
);
case _o: {
var u = f,
@@ -15265,13 +13725,7 @@ Error generating stack: ` +
try {
y = g(p);
} catch (we) {
- throw (
- (typeof we == "object" &&
- we !== null &&
- typeof we.then == "function" &&
- Xn(a, "Lazy"),
- we)
- );
+ throw (typeof we == "object" && we !== null && typeof we.then == "function" && Xn(a, "Lazy"), we);
}
Ue(o, a, y);
return;
@@ -15300,35 +13754,23 @@ Error generating stack: ` +
var j = Object.prototype.toString.call(f);
throw new Error(
"Objects are not valid as a React child (found: " +
- (j === "[object Object]"
- ? "object with keys {" + Object.keys(f).join(", ") + "}"
- : j) +
- "). If you meant to render a collection of children, use an array instead."
+ (j === "[object Object]" ? "object with keys {" + Object.keys(f).join(", ") + "}" : j) +
+ "). If you meant to render a collection of children, use an array instead.",
);
}
if (typeof f == "string") {
var Z = a.blockedSegment;
- Z.lastPushedText = ht(
- a.blockedSegment.chunks,
- f,
- o.responseState,
- Z.lastPushedText
- );
+ Z.lastPushedText = ht(a.blockedSegment.chunks, f, o.responseState, Z.lastPushedText);
return;
}
if (typeof f == "number") {
var de = a.blockedSegment;
- de.lastPushedText = ht(
- a.blockedSegment.chunks,
- "" + f,
- o.responseState,
- de.lastPushedText
- );
+ de.lastPushedText = ht(a.blockedSegment.chunks, "" + f, o.responseState, de.lastPushedText);
return;
}
typeof f == "function" &&
c(
- "Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."
+ "Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.",
);
}
function ea(o, a, f) {
@@ -15347,18 +13789,8 @@ Error generating stack: ` +
t = d.chunks.length,
r = nn(o, t, null, d.formatContext, d.lastPushedText, !0);
d.children.push(r), (d.lastPushedText = !1);
- var l = at(
- o,
- a.node,
- a.blockedBoundary,
- r,
- a.abortSet,
- a.legacyContext,
- a.context,
- a.treeContext
- );
- a.componentStack !== null &&
- (l.componentStack = a.componentStack.parent);
+ var l = at(o, a.node, a.blockedBoundary, r, a.abortSet, a.legacyContext, a.context, a.treeContext);
+ a.componentStack !== null && (l.componentStack = a.componentStack.parent);
var u = l.ping;
f.then(u, u);
}
@@ -15371,10 +13803,7 @@ Error generating stack: ` +
try {
return Ue(o, a, f);
} catch (u) {
- if (
- (ci(),
- typeof u == "object" && u !== null && typeof u.then == "function")
- ) {
+ if ((ci(), typeof u == "object" && u !== null && typeof u.then == "function")) {
Lu(o, a, u),
(a.blockedSegment.formatContext = d),
(a.legacyContext = t),
@@ -15421,24 +13850,15 @@ Error generating stack: ` +
var d = o.blockedBoundary,
t = o.blockedSegment;
if (((t.status = gl), d === null))
- a.allPendingTasks--,
- a.status !== rn &&
- ((a.status = rn), a.destination !== null && xe(a.destination));
+ a.allPendingTasks--, a.status !== rn && ((a.status = rn), a.destination !== null && xe(a.destination));
else {
if ((d.pendingTasks--, !d.forceClientRender)) {
d.forceClientRender = !0;
- var r =
- f === void 0
- ? new Error(
- "The render was aborted by the server without a reason."
- )
- : f;
+ var r = f === void 0 ? new Error("The render was aborted by the server without a reason.") : f;
d.errorDigest = a.onError(r);
{
var l = "The server did not finish this Suspense boundary: ";
- r && typeof r.message == "string"
- ? (r = l + r.message)
- : (r = l + String(r));
+ r && typeof r.message == "string" ? (r = l + r.message) : (r = l + String(r));
var u = Ne;
Ne = o;
try {
@@ -15463,11 +13883,7 @@ Error generating stack: ` +
}
}
function ra(o, a) {
- if (
- a.chunks.length === 0 &&
- a.children.length === 1 &&
- a.children[0].boundary === null
- ) {
+ if (a.chunks.length === 0 && a.children.length === 1 && a.children[0].boundary === null) {
var f = a.children[0];
(f.id = a.id), (f.parentFlushed = !0), f.status === wr && ra(o, f);
} else {
@@ -15479,9 +13895,7 @@ Error generating stack: ` +
if (a === null) {
if (f.parentFlushed) {
if (o.completedRootSegment !== null)
- throw new Error(
- "There can only be one root segment. This is a bug in React."
- );
+ throw new Error("There can only be one root segment. This is a bug in React.");
o.completedRootSegment = f;
}
if ((o.pendingRootTasks--, o.pendingRootTasks === 0)) {
@@ -15519,16 +13933,10 @@ Error generating stack: ` +
(f.status = wr),
Ri(o, a.blockedBoundary, f);
} catch (r) {
- if (
- (ci(),
- typeof r == "object" && r !== null && typeof r.then == "function")
- ) {
+ if ((ci(), typeof r == "object" && r !== null && typeof r.then == "function")) {
var t = a.ping;
r.then(t, t);
- } else
- a.abortSet.delete(a),
- (f.status = gi),
- El(o, a.blockedBoundary, f, r);
+ } else a.abortSet.delete(a), (f.status = gi), El(o, a.blockedBoundary, f, r);
} finally {
Ne = d;
}
@@ -15554,10 +13962,7 @@ Error generating stack: ` +
} catch (p) {
Jn(o, p), Ko(o, p);
} finally {
- Xo(t),
- (Vn.current = f),
- (Zt.getCurrentStack = d),
- f === di && Lo(a);
+ Xo(t), (Vn.current = f), (Zt.getCurrentStack = d), f === di && Lo(a);
}
}
}
@@ -15565,19 +13970,11 @@ Error generating stack: ` +
switch (((f.parentFlushed = !0), f.status)) {
case Zo: {
var d = (f.id = o.nextSegmentId++);
- return (
- (f.lastPushedText = !1),
- (f.textEmbedded = !1),
- ee(a, o.responseState, d)
- );
+ return (f.lastPushedText = !1), (f.textEmbedded = !1), ee(a, o.responseState, d);
}
case wr: {
f.status = vi;
- for (
- var t = !0, r = f.chunks, l = 0, u = f.children, p = 0;
- p < u.length;
- p++
- ) {
+ for (var t = !0, r = f.chunks, l = 0, u = f.children, p = 0; p < u.length; p++) {
for (var g = u[p]; l < g.index; l++) P(a, r[l]);
t = qn(o, a, g);
}
@@ -15586,7 +13983,7 @@ Error generating stack: ` +
}
default:
throw new Error(
- "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
+ "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.",
);
}
}
@@ -15595,19 +13992,12 @@ Error generating stack: ` +
if (d === null) return oa(o, a, f);
if (((d.parentFlushed = !0), d.forceClientRender))
return (
- ms(
- a,
- o.responseState,
- d.errorDigest,
- d.errorMessage,
- d.errorComponentStack
- ),
+ ms(a, o.responseState, d.errorDigest, d.errorMessage, d.errorComponentStack),
oa(o, a, f),
bs(a, o.responseState)
);
if (d.pendingTasks > 0) {
- (d.rootSegmentID = o.nextSegmentId++),
- d.completedSegments.length > 0 && o.partialBoundaries.push(d);
+ (d.rootSegmentID = o.nextSegmentId++), d.completedSegments.length > 0 && o.partialBoundaries.push(d);
var t = (d.id = Br(o.responseState));
return Ni(a, o.responseState, t), oa(o, a, f), Vi(a, o.responseState);
} else {
@@ -15623,28 +14013,17 @@ Error generating stack: ` +
var r = d.completedSegments;
if (r.length !== 1)
throw new Error(
- "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React.",
);
var l = r[0];
return qn(o, a, l), ys(a, o.responseState);
}
}
function Rl(o, a, f) {
- return eu(
- a,
- o.responseState,
- f.id,
- f.errorDigest,
- f.errorMessage,
- f.errorComponentStack
- );
+ return eu(a, o.responseState, f.id, f.errorDigest, f.errorMessage, f.errorComponentStack);
}
function Il(o, a, f) {
- return (
- Ws(a, o.responseState, f.formatContext, f.id),
- qn(o, a, f),
- zs(a, f.formatContext)
- );
+ return Ws(a, o.responseState, f.formatContext, f.id), qn(o, a, f), zs(a, f.formatContext);
}
function Ii(o, a, f) {
for (var d = f.completedSegments, t = 0; t < d.length; t++) {
@@ -15665,10 +14044,7 @@ Error generating stack: ` +
var t = d.id;
if (t === -1) {
var r = (d.id = f.rootSegmentID);
- if (r === -1)
- throw new Error(
- "A root segment ID must have been assigned by now. This is a bug in React."
- );
+ if (r === -1) throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");
return Il(o, a, d);
} else return Il(o, a, d), La(a, o.responseState, t);
}
@@ -15678,9 +14054,7 @@ Error generating stack: ` +
var f = o.completedRootSegment;
f !== null &&
o.pendingRootTasks === 0 &&
- (qn(o, a, f),
- (o.completedRootSegment = null),
- Y(a, o.responseState));
+ (qn(o, a, f), (o.completedRootSegment = null), Y(a, o.responseState));
var d = o.clientRenderedBoundaries,
t;
for (t = 0; t < d.length; t++) {
@@ -15726,9 +14100,7 @@ Error generating stack: ` +
o.clientRenderedBoundaries.length === 0 &&
o.completedBoundaries.length === 0 &&
(o.abortableTasks.size !== 0 &&
- c(
- "There was still abortable task at the root when we closed. This is a bug in React."
- ),
+ c("There was still abortable task at the root when we closed. This is a bug in React."),
xe(a));
}
}
@@ -15781,7 +14153,7 @@ Error generating stack: ` +
a ? a.nonce : void 0,
a ? a.bootstrapScriptContent : void 0,
a ? a.bootstrapScripts : void 0,
- a ? a.bootstrapModules : void 0
+ a ? a.bootstrapModules : void 0,
),
wn(a ? a.namespaceURI : void 0),
a ? a.progressiveChunkSize : void 0,
@@ -15789,7 +14161,7 @@ Error generating stack: ` +
a ? a.onAllReady : void 0,
a ? a.onShellReady : void 0,
a ? a.onShellError : void 0,
- void 0
+ void 0,
);
}
function Al(o, a) {
@@ -15799,27 +14171,13 @@ Error generating stack: ` +
_l(f),
{
pipe: function (t) {
- if (d)
- throw new Error(
- "React currently only supports piping to one writable stream."
- );
+ if (d) throw new Error("React currently only supports piping to one writable stream.");
return (
(d = !0),
Pl(f, t),
t.on("drain", Bu(t, f)),
- t.on(
- "error",
- Fl(
- f,
- new Error(
- "The destination stream errored while writing data."
- )
- )
- ),
- t.on(
- "close",
- Fl(f, new Error("The destination stream closed early."))
- ),
+ t.on("error", Fl(f, new Error("The destination stream errored while writing data."))),
+ t.on("close", Fl(f, new Error("The destination stream closed early."))),
t
);
},
@@ -15832,12 +14190,10 @@ Error generating stack: ` +
(Pc.renderToPipeableStream = Al), (Pc.version = i);
})();
});
-var zd = an((lo) => {
+var zd = an(lo => {
"use strict";
var io, Fc;
- process.env.NODE_ENV === "production"
- ? ((io = Wf()), (Fc = jd()))
- : ((io = Hd()), (Fc = Wd()));
+ process.env.NODE_ENV === "production" ? ((io = Wf()), (Fc = jd())) : ((io = Hd()), (Fc = Wd()));
lo.version = io.version;
lo.renderToString = io.renderToString;
lo.renderToStaticMarkup = io.renderToStaticMarkup;
@@ -15852,11 +14208,7 @@ var Nd = Dc(zd()),
$i.default.createElement(
"html",
null,
- $i.default.createElement(
- "body",
- null,
- $i.default.createElement("h1", null, "Hello World")
- )
+ $i.default.createElement("body", null, $i.default.createElement("h1", null, "Hello World")),
),
$d = !1;
Cv.createServer(function (e, n) {
@@ -15868,10 +14220,7 @@ Cv.createServer(function (e, n) {
i.pipe(n);
},
onShellError(s) {
- (n.statusCode = 500),
- n.send(
- '<!doctype html><p>Loading...</p><script src="clientrender.js"></script>'
- );
+ (n.statusCode = 500), n.send('<!doctype html><p>Loading...</p><script src="clientrender.js"></script>');
},
onAllReady() {},
onError(s) {
diff --git a/bench/react-hello-world/react-hello-world.node.jsx b/bench/react-hello-world/react-hello-world.node.jsx
index b267bbd4d..2f3c06149 100644
--- a/bench/react-hello-world/react-hello-world.node.jsx
+++ b/bench/react-hello-world/react-hello-world.node.jsx
@@ -24,9 +24,7 @@ http
onShellError(error) {
// Something errored before we could complete the shell so we emit an alternative shell.
res.statusCode = 500;
- res.send(
- '<!doctype html><p>Loading...</p><script src="clientrender.js"></script>'
- );
+ res.send('<!doctype html><p>Loading...</p><script src="clientrender.js"></script>');
},
onAllReady() {
// If you don't want streaming, use this instead of onShellReady.
diff --git a/bench/scanner/scan-imports-only.js b/bench/scanner/scan-imports-only.js
index 53222d57c..3cd55fe2c 100644
--- a/bench/scanner/scan-imports-only.js
+++ b/bench/scanner/scan-imports-only.js
@@ -8,8 +8,6 @@ const transpiler = new Bun.Transpiler({
console.time("Get exports");
const ITERATIONS = parseInt(process.env.ITERATIONS || "1") || 1;
for (let i = 0; i < ITERATIONS; i++) {
- const imports = transpiler.scanImports(
- readFileSync("remix-route.ts", "utf8")
- );
+ const imports = transpiler.scanImports(readFileSync("remix-route.ts", "utf8"));
}
console.timeEnd("Get exports");
diff --git a/bench/snippets/array-map.mjs b/bench/snippets/array-map.mjs
index 2b6f4f669..615770220 100644
--- a/bench/snippets/array-map.mjs
+++ b/bench/snippets/array-map.mjs
@@ -1,7 +1,7 @@
// https://github.com/oven-sh/bun/issues/1096
import { bench, run } from "mitata";
-const identity = (x) => x;
+const identity = x => x;
for (let i = 0; i < 20; i++) {
var array = new Array(i);
@@ -22,35 +22,15 @@ bench("inline Array.map x 6", () => [1, 1, 1, 1, 1, 1].map(identity));
bench("inline Array.map x 7", () => [1, 1, 1, 1, 1, 1, 1].map(identity));
bench("inline Array.map x 8", () => [1, 1, 1, 1, 1, 1, 1, 1].map(identity));
bench("inline Array.map x 9", () => [1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
-bench("inline Array.map x 10", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 11", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 12", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 13", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 14", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 15", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 16", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 17", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 18", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
-bench("inline Array.map x 19", () =>
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity)
-);
+bench("inline Array.map x 10", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 11", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 12", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 13", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 14", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 15", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 16", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 17", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 18", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
+bench("inline Array.map x 19", () => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1].map(identity));
await run();
diff --git a/bench/snippets/assert.mjs b/bench/snippets/assert.mjs
index bbc36d1ea..dc6c98d2e 100644
--- a/bench/snippets/assert.mjs
+++ b/bench/snippets/assert.mjs
@@ -6,10 +6,7 @@ bench("deepEqual", () => {
});
bench("deepStrictEqual", () => {
- assert.deepStrictEqual(
- { foo: "123", beep: "boop" },
- { foo: "123", beep: "boop" },
- );
+ assert.deepStrictEqual({ foo: "123", beep: "boop" }, { foo: "123", beep: "boop" });
});
await run();
diff --git a/bench/snippets/async-overhead.mjs b/bench/snippets/async-overhead.mjs
index bec278b56..753af1632 100644
--- a/bench/snippets/async-overhead.mjs
+++ b/bench/snippets/async-overhead.mjs
@@ -19,13 +19,10 @@ bench("promise.nextTick", async function () {
});
bench("await new Promise(resolve => resolve())", async function () {
- await new Promise((resolve) => resolve());
+ await new Promise(resolve => resolve());
+});
+bench("Promise.all(Array.from({length: 100}, () => new Promise((resolve) => resolve())))", async function () {
+ return Promise.all(Array.from({ length: 100 }, () => Promise.resolve(1)));
});
-bench(
- "Promise.all(Array.from({length: 100}, () => new Promise((resolve) => resolve())))",
- async function () {
- return Promise.all(Array.from({ length: 100 }, () => Promise.resolve(1)));
- },
-);
await run();
diff --git a/bench/snippets/buffer-read.js b/bench/snippets/buffer-read.js
index 5da645153..46c64b59f 100644
--- a/bench/snippets/buffer-read.js
+++ b/bench/snippets/buffer-read.js
@@ -23,9 +23,7 @@ time("Uint8Array[]", () => array[0]);
console.log("");
time("Buffer.getBigInt64BE ", () => buf.readBigInt64BE(0));
-time("DataView.getBigInt64 (BE)", () =>
- view.getBigInt64(0, false).toString(10)
-);
+time("DataView.getBigInt64 (BE)", () => view.getBigInt64(0, false).toString(10));
console.log("");
time("Buffer.readBigInt64LE ", () => buf.readBigInt64LE(0));
diff --git a/bench/snippets/buffer.js b/bench/snippets/buffer.js
index 9ababbf35..22dad8e34 100644
--- a/bench/snippets/buffer.js
+++ b/bench/snippets/buffer.js
@@ -10,18 +10,13 @@ var time = (name, fn) => {
console.timeEnd(name.padEnd('Buffer.write(string, "latin1")'.length));
};
-console.log(
- `Run ${new Intl.NumberFormat().format(INTERVAL)} times with a warmup:`,
- "\n"
-);
+console.log(`Run ${new Intl.NumberFormat().format(INTERVAL)} times with a warmup:`, "\n");
const stringToWrite = "hellooooohellooooo";
time('Buffer.write(string, "utf8")', () => buf.write(stringToWrite, "utf8"));
time('Buffer.write(string, "ascii")', () => buf.write(stringToWrite, "ascii"));
-time('Buffer.write(string, "latin1")', () =>
- buf.write(stringToWrite, "latin1")
-);
+time('Buffer.write(string, "latin1")', () => buf.write(stringToWrite, "latin1"));
time("Buffer.readBigInt64BE ", () => buf.readBigInt64BE(0));
// time("DataView.getBigInt64 (BE)", () => view.getBigInt64(0, false));
// console.log("");
diff --git a/bench/snippets/callbacks-overhead.mjs b/bench/snippets/callbacks-overhead.mjs
index 65171145c..4bc535ecd 100644
--- a/bench/snippets/callbacks-overhead.mjs
+++ b/bench/snippets/callbacks-overhead.mjs
@@ -35,40 +35,26 @@ async function test(log) {
{
const a = performance.now();
await tests.async(0);
- if (log)
- console.log(
- `async/await: ${(report.async = (performance.now() - a).toFixed(4))}ms`
- );
+ if (log) console.log(`async/await: ${(report.async = (performance.now() - a).toFixed(4))}ms`);
}
{
const a = performance.now();
tests.callback(0, function () {
- if (log)
- console.log(
- `callback: ${(report.callback = (performance.now() - a).toFixed(
- 4
- ))}ms`
- );
+ if (log) console.log(`callback: ${(report.callback = (performance.now() - a).toFixed(4))}ms`);
});
}
{
const a = performance.now();
await tests.then(0);
- if (log)
- console.log(
- `then: ${(report.then = (performance.now() - a).toFixed(4))}ms`
- );
+ if (log) console.log(`then: ${(report.then = (performance.now() - a).toFixed(4))}ms`);
}
{
const a = performance.now();
tests.sync(0);
- if (log)
- console.log(
- `sync: ${(report.sync = (performance.now() - a).toFixed(4))}ms`
- );
+ if (log) console.log(`sync: ${(report.sync = (performance.now() - a).toFixed(4))}ms`);
}
}
diff --git a/bench/snippets/concat.js b/bench/snippets/concat.js
index 46c6e0f7d..310e67c37 100644
--- a/bench/snippets/concat.js
+++ b/bench/snippets/concat.js
@@ -34,33 +34,25 @@ function polyfillUninitialized(chunks) {
const chunkGroups = [
[Uint8Array.from([123]), Uint8Array.from([456]), Uint8Array.from([789])],
- Array.from(readFileSync(import.meta.path)).map((a) => Uint8Array.from([a])),
+ Array.from(readFileSync(import.meta.path)).map(a => Uint8Array.from([a])),
[readFileSync(import.meta.path)],
Array.from({ length: 42 }, () => readFileSync(import.meta.path)),
- Array.from({ length: 2 }, () =>
- new TextEncoder().encode(readFileSync(import.meta.path, "utf8").repeat(100))
- ),
+ Array.from({ length: 2 }, () => new TextEncoder().encode(readFileSync(import.meta.path, "utf8").repeat(100))),
];
for (const chunks of chunkGroups) {
- group(
- `${chunks.reduce(
- (prev, curr, i, a) => prev + curr.byteLength,
- 0
- )} bytes for ${chunks.length} chunks`,
- () => {
- bench("Bun.concatArrayBuffers", () => {
- Bun.concatArrayBuffers(chunks);
- });
- bench("Uint8Array.set", () => {
- polyfill(chunks);
- });
+ group(`${chunks.reduce((prev, curr, i, a) => prev + curr.byteLength, 0)} bytes for ${chunks.length} chunks`, () => {
+ bench("Bun.concatArrayBuffers", () => {
+ Bun.concatArrayBuffers(chunks);
+ });
+ bench("Uint8Array.set", () => {
+ polyfill(chunks);
+ });
- bench("Uint8Array.set (uninitialized memory)", () => {
- polyfillUninitialized(chunks);
- });
- }
- );
+ bench("Uint8Array.set (uninitialized memory)", () => {
+ polyfillUninitialized(chunks);
+ });
+ });
}
await run();
diff --git a/bench/snippets/console-log.mjs b/bench/snippets/console-log.mjs
index 9105c71db..b95533f01 100644
--- a/bench/snippets/console-log.mjs
+++ b/bench/snippets/console-log.mjs
@@ -9,8 +9,7 @@ const json = {
url: "https://api.github.com/users/wongmjane",
html_url: "https://github.com/wongmjane",
followers_url: "https://api.github.com/users/wongmjane/followers",
- following_url:
- "https://api.github.com/users/wongmjane/following{/other_user}",
+ following_url: "https://api.github.com/users/wongmjane/following{/other_user}",
gists_url: "https://api.github.com/users/wongmjane/gists{/gist_id}",
starred_url: "https://api.github.com/users/wongmjane/starred{/owner}{/repo}",
subscriptions_url: "https://api.github.com/users/wongmjane/subscriptions",
@@ -37,11 +36,7 @@ const json = {
};
const inspect =
- "Bun" in globalThis
- ? Bun.inspect
- : "Deno" in globalThis
- ? Deno.inspect
- : (await import("util")).inspect;
+ "Bun" in globalThis ? Bun.inspect : "Deno" in globalThis ? Deno.inspect : (await import("util")).inspect;
bench("big json object", () => {
console.error(json);
});
diff --git a/bench/snippets/deep-equals.js b/bench/snippets/deep-equals.js
index a56704721..bbb663113 100644
--- a/bench/snippets/deep-equals.js
+++ b/bench/snippets/deep-equals.js
@@ -259,15 +259,13 @@ const fixture = [
equal: false,
},
{
- description:
- "objects with different `toString` functions returning same values are equal",
+ description: "objects with different `toString` functions returning same values are equal",
value1: { toString: () => "Hello world!" },
value2: { toString: () => "Hello world!" },
equal: true,
},
{
- description:
- "objects with `toString` functions returning different values are not equal",
+ description: "objects with `toString` functions returning different values are not equal",
value1: { toString: () => "Hello world!" },
value2: { toString: () => "Hi!" },
equal: false,
@@ -311,13 +309,13 @@ const fixture = [
{
description: "equal arrays of objects",
value1: [
- ...Array.from({ length: 200000 }, (i) => ({
+ ...Array.from({ length: 200000 }, i => ({
a: 1,
b: 2,
})),
],
value2: [
- ...Array.from({ length: 200000 }, (i) => ({
+ ...Array.from({ length: 200000 }, i => ({
a: 1,
b: 2,
})),
@@ -495,9 +493,7 @@ for (let { tests, description } of fixture) {
bench(equalsFn.name, () => {
expected = equalsFn(value1, value2);
if (expected !== equal) {
- throw new Error(
- `Expected ${expected} to be ${equal} for ${description}`,
- );
+ throw new Error(`Expected ${expected} to be ${equal} for ${description}`);
}
});
}
diff --git a/bench/snippets/define-properties.mjs b/bench/snippets/define-properties.mjs
index 935737b2d..6a10ab183 100644
--- a/bench/snippets/define-properties.mjs
+++ b/bench/snippets/define-properties.mjs
@@ -19,14 +19,7 @@ const properties = {
writable: {
get() {
const w = this._writableState;
- return (
- !!w &&
- w.writable !== false &&
- !w.destroyed &&
- !w.errored &&
- !w.ending &&
- !w.ended
- );
+ return !!w && w.writable !== false && !w.destroyed && !w.errored && !w.ending && !w.ended;
},
set(val) {
if (this._writableState) {
diff --git a/bench/snippets/dns.node.mjs b/bench/snippets/dns.node.mjs
index 1a27afd0d..2796ad702 100644
--- a/bench/snippets/dns.node.mjs
+++ b/bench/snippets/dns.node.mjs
@@ -7,7 +7,7 @@ bench("(cached) dns.lookup remote x 50", async () => {
const total = 50;
var remain = total;
var done;
- await new Promise((resolve) => {
+ await new Promise(resolve => {
for (var i = 0; i < total; i++)
run().finally(() => {
remain--;
@@ -25,7 +25,7 @@ bench("(cached in batch) dns.lookup remote x 50", async () => {
const total = 50;
var remain = total;
var done;
- await new Promise((resolve) => {
+ await new Promise(resolve => {
for (var i = 0; i < total; i++)
run().finally(() => {
remain--;
@@ -40,10 +40,9 @@ bench("(cached in batch) dns.lookup remote x 50", async () => {
bench("dns.lookup remote x 50", async () => {
var remain = 50;
var done;
- const run = () =>
- lookup(Math.random().toString() + ".example.com").catch(() => {});
+ const run = () => lookup(Math.random().toString() + ".example.com").catch(() => {});
- await new Promise((resolve) => {
+ await new Promise(resolve => {
for (var i = 0; i < 50; i++)
run().finally(() => {
remain--;
@@ -58,10 +57,9 @@ bench("dns.lookup remote x 50", async () => {
bench("dns.resolve remote x 50", async () => {
var remain = 50;
var done;
- const run = () =>
- resolve(Math.random().toString() + ".example.com").catch(() => {});
+ const run = () => resolve(Math.random().toString() + ".example.com").catch(() => {});
- await new Promise((resolve) => {
+ await new Promise(resolve => {
for (var i = 0; i < 50; i++)
run().finally(() => {
remain--;
diff --git a/bench/snippets/dns.ts b/bench/snippets/dns.ts
index 308d54b6a..930cd3b83 100644
--- a/bench/snippets/dns.ts
+++ b/bench/snippets/dns.ts
@@ -3,23 +3,16 @@ import { bench, run, group } from "mitata";
async function forEachBackend(name, fn) {
group(name, () => {
- for (let backend of [
- "libc",
- "c-ares",
- process.platform === "darwin" ? "system" : "",
- ].filter(Boolean))
+ for (let backend of ["libc", "c-ares", process.platform === "darwin" ? "system" : ""].filter(Boolean))
bench(backend, fn(backend));
});
}
-forEachBackend("dns.lookup remote x 50", (backend) => async () => {
- const run = () =>
- dns
- .lookup(Math.random().toString(16) + ".example.com", { backend })
- .catch(() => {});
+forEachBackend("dns.lookup remote x 50", backend => async () => {
+ const run = () => dns.lookup(Math.random().toString(16) + ".example.com", { backend }).catch(() => {});
var remain = 16;
var done;
- await new Promise((resolve) => {
+ await new Promise(resolve => {
for (var i = 0; i < 16; i++)
run().finally(() => {
remain--;
@@ -31,7 +24,7 @@ forEachBackend("dns.lookup remote x 50", (backend) => async () => {
});
});
-forEachBackend("(cached) dns.lookup remote x 50", (backend) => {
+forEachBackend("(cached) dns.lookup remote x 50", backend => {
var tld = "example.com";
const run = () => dns.lookup(tld, { backend }).catch(() => {});
@@ -39,7 +32,7 @@ forEachBackend("(cached) dns.lookup remote x 50", (backend) => {
const total = 50;
var remain = total;
var done;
- await new Promise((resolve) => {
+ await new Promise(resolve => {
for (var i = 0; i < total; i++)
run().finally(() => {
remain--;
@@ -52,25 +45,22 @@ forEachBackend("(cached) dns.lookup remote x 50", (backend) => {
};
});
-forEachBackend(
- "(cached in batch) dns.lookup remote x 50",
- (backend) => async () => {
- var tld = Math.random().toString(16) + ".example.com";
- const run = () => dns.lookup(tld, { backend }).catch(() => {});
- const total = 50;
- var remain = total;
- var done;
- await new Promise((resolve) => {
- for (var i = 0; i < total; i++)
- run().finally(() => {
- remain--;
- if (remain === 0) {
- done();
- }
- });
- done = resolve;
- });
- },
-);
+forEachBackend("(cached in batch) dns.lookup remote x 50", backend => async () => {
+ var tld = Math.random().toString(16) + ".example.com";
+ const run = () => dns.lookup(tld, { backend }).catch(() => {});
+ const total = 50;
+ var remain = total;
+ var done;
+ await new Promise(resolve => {
+ for (var i = 0; i < total; i++)
+ run().finally(() => {
+ remain--;
+ if (remain === 0) {
+ done();
+ }
+ });
+ done = resolve;
+ });
+});
await run();
diff --git a/bench/snippets/escapeHTML.js b/bench/snippets/escapeHTML.js
index f186b1d2f..19570b9f6 100644
--- a/bench/snippets/escapeHTML.js
+++ b/bench/snippets/escapeHTML.js
@@ -8,7 +8,7 @@ var bunEscapeHTML = globalThis.escapeHTML || Bun.escapeHTML;
const FIXTURE = require("fs")
.readFileSync(import.meta.dir + "/_fixture.txt", "utf8")
.split("")
- .map((a) => {
+ .map(a => {
if (a.charCodeAt(0) > 127) {
return "a";
}
@@ -16,10 +16,7 @@ const FIXTURE = require("fs")
})
.join("");
-const FIXTURE_WITH_UNICODE = require("fs").readFileSync(
- import.meta.dir + "/_fixture.txt",
- "utf8"
-);
+const FIXTURE_WITH_UNICODE = require("fs").readFileSync(import.meta.dir + "/_fixture.txt", "utf8");
// from react-dom:
const matchHtmlRegExp = /["'&<>]/;
@@ -116,7 +113,7 @@ for (let input of [
// bench(`html-entities.encode`, () => htmlEntityEncode(input));
// bench(`he.escape`, () => heEscape(input));
bench(`Bun.escapeHTML`, () => bunEscapeHTML(input));
- }
+ },
);
}
await run();
diff --git a/bench/snippets/ffi-overhead.mjs b/bench/snippets/ffi-overhead.mjs
index dcceef7ba..382300ac6 100644
--- a/bench/snippets/ffi-overhead.mjs
+++ b/bench/snippets/ffi-overhead.mjs
@@ -1,13 +1,4 @@
-import {
- viewSource,
- dlopen,
- CString,
- ptr,
- toBuffer,
- toArrayBuffer,
- FFIType,
- callback,
-} from "bun:ffi";
+import { viewSource, dlopen, CString, ptr, toBuffer, toArrayBuffer, FFIType, callback } from "bun:ffi";
import { bench, group, run } from "mitata";
const types = {
@@ -235,9 +226,7 @@ var opened;
try {
opened = dlopen("/tmp/bun-ffi-test.dylib", types);
} catch (e) {
- throw new Error(
- "Please run `make compile-ffi-test` to compile the ffi test library"
- );
+ throw new Error("Please run `make compile-ffi-test` to compile the ffi test library");
}
const {
@@ -403,10 +392,10 @@ group("returns_true", () => {
group("return_a_function_ptr_to_function_that_returns_true", () => {
bench("return_a_function_ptr_to_function_that_returns_true (raw)", () =>
- raw_return_a_function_ptr_to_function_that_returns_true()
+ raw_return_a_function_ptr_to_function_that_returns_true(),
);
bench("return_a_function_ptr_to_function_that_returns_true", () =>
- return_a_function_ptr_to_function_that_returns_true()
+ return_a_function_ptr_to_function_that_returns_true(),
);
});
group("returns_42_float", () => {
@@ -427,8 +416,7 @@ group("identity_double", () => {
});
var raw_return_a_function_ptr_to_function_that_returns_true =
- return_a_function_ptr_to_function_that_returns_true.native ??
- return_a_function_ptr_to_function_that_returns_true;
+ return_a_function_ptr_to_function_that_returns_true.native ?? return_a_function_ptr_to_function_that_returns_true;
var raw_returns_42_float = returns_42_float.native ?? returns_42_float;
var raw_returns_42_double = returns_42_double.native ?? returns_42_double;
var raw_identity_float = identity_float.native ?? identity_float;
@@ -437,14 +425,11 @@ var raw_returns_true = returns_true.native ?? returns_true;
var raw_returns_false = returns_false.native ?? returns_false;
var raw_returns_42_char = returns_42_char.native ?? returns_42_char;
var raw_returns_42_uint8_t = returns_42_uint8_t.native ?? returns_42_uint8_t;
-var raw_returns_neg_42_int8_t =
- returns_neg_42_int8_t.native ?? returns_neg_42_int8_t;
+var raw_returns_neg_42_int8_t = returns_neg_42_int8_t.native ?? returns_neg_42_int8_t;
var raw_returns_42_uint16_t = returns_42_uint16_t.native ?? returns_42_uint16_t;
var raw_returns_42_uint32_t = returns_42_uint32_t.native ?? returns_42_uint32_t;
-var raw_returns_neg_42_int16_t =
- returns_neg_42_int16_t.native ?? returns_neg_42_int16_t;
-var raw_returns_neg_42_int32_t =
- returns_neg_42_int32_t.native ?? returns_neg_42_int32_t;
+var raw_returns_neg_42_int16_t = returns_neg_42_int16_t.native ?? returns_neg_42_int16_t;
+var raw_returns_neg_42_int32_t = returns_neg_42_int32_t.native ?? returns_neg_42_int32_t;
var raw_identity_char = identity_char.native ?? identity_char;
var raw_identity_bool = identity_bool.native ?? identity_bool;
var raw_identity_bool = identity_bool.native ?? identity_bool;
diff --git a/bench/snippets/index-of.mjs b/bench/snippets/index-of.mjs
index a7aad7a1e..8f501454d 100644
--- a/bench/snippets/index-of.mjs
+++ b/bench/snippets/index-of.mjs
@@ -2,7 +2,7 @@ import { bench, run } from "mitata";
const input =
"Hello, World! foo bar baz qux quux corge grault garply waldo fred plugh xyzzy thud z a b c d e f g h i j k l m n o p q r s t u v w x y z".split(
- " "
+ " ",
);
bench(`Array.indexOf`, () => {
diff --git a/bench/snippets/react-dom-render.bun.js b/bench/snippets/react-dom-render.bun.js
index f23848ad8..7b53210e2 100644
--- a/bench/snippets/react-dom-render.bun.js
+++ b/bench/snippets/react-dom-render.bun.js
@@ -5,64 +5,30 @@ import { renderToReadableStream as renderToReadableStreamBun } from "../test/bun
const App = () => (
<div>
<h1>Hello, world!</h1>
- <p>
- This is a React component This is a React component This is a React
- component This is a React component.
- </p>
- <p>
- This is a React component This is a React component This is a React
- component This is a React component.
- </p>
- <p>
- This is a React component This is a React component This is a React
- component This is a React component.
- </p>
- <p>
- This is a React component This is a React component This is a React
- component This is a React component.
- </p>
- <p>
- This is a React component This is a React component This is a React
- component This is a React component.
- </p>
+ <p>This is a React component This is a React component This is a React component This is a React component.</p>
+ <p>This is a React component This is a React component This is a React component This is a React component.</p>
+ <p>This is a React component This is a React component This is a React component This is a React component.</p>
+ <p>This is a React component This is a React component This is a React component This is a React component.</p>
+ <p>This is a React component This is a React component This is a React component This is a React component.</p>
</div>
);
group("new Response(stream).text()", () => {
- bench(
- "react-dom/server.browser",
- async () => await new Response(await renderToReadableStream(<App />)).text()
- );
- bench(
- "react-dom/server.bun",
- async () =>
- await new Response(await renderToReadableStreamBun(<App />)).text()
- );
+ bench("react-dom/server.browser", async () => await new Response(await renderToReadableStream(<App />)).text());
+ bench("react-dom/server.bun", async () => await new Response(await renderToReadableStreamBun(<App />)).text());
});
group("new Response(stream).arrayBuffer()", () => {
bench(
"react-dom/server.browser",
- async () =>
- await new Response(await renderToReadableStream(<App />)).arrayBuffer()
- );
- bench(
- "react-dom/server.bun",
- async () =>
- await new Response(await renderToReadableStreamBun(<App />)).arrayBuffer()
+ async () => await new Response(await renderToReadableStream(<App />)).arrayBuffer(),
);
+ bench("react-dom/server.bun", async () => await new Response(await renderToReadableStreamBun(<App />)).arrayBuffer());
});
group("new Response(stream).blob()", () => {
- bench(
- "react-dom/server.browser",
- async () => await new Response(await renderToReadableStream(<App />)).blob()
- );
- bench(
- "react-dom/server.bun",
- async () =>
- await new Response(await renderToReadableStreamBun(<App />)).blob()
- );
+ bench("react-dom/server.browser", async () => await new Response(await renderToReadableStream(<App />)).blob());
+ bench("react-dom/server.bun", async () => await new Response(await renderToReadableStreamBun(<App />)).blob());
});
await run();
diff --git a/bench/snippets/return-await.mjs b/bench/snippets/return-await.mjs
index 1df17a22d..079eb4bdd 100644
--- a/bench/snippets/return-await.mjs
+++ b/bench/snippets/return-await.mjs
@@ -12,5 +12,4 @@ bench("return await 1", async function () {
return await 1;
});
-
await run();
diff --git a/bench/snippets/transpiler.mjs b/bench/snippets/transpiler.mjs
index 2facfeab7..ab4b29dc5 100644
--- a/bench/snippets/transpiler.mjs
+++ b/bench/snippets/transpiler.mjs
@@ -8,11 +8,7 @@ const esbuild_ = require("esbuild/lib/main");
const swc_ = require("@swc/core");
const babel_ = require("@babel/core");
-const code = readFileSync(
- dirname(fileURLToPath(import.meta.url)) +
- "/../../src/test/fixtures/simple.jsx",
- "utf-8",
-);
+const code = readFileSync(dirname(fileURLToPath(import.meta.url)) + "/../../src/test/fixtures/simple.jsx", "utf-8");
async function getWithName(name) {
let transformSync;
diff --git a/bench/websocket-server/chat-client.mjs b/bench/websocket-server/chat-client.mjs
index 786ebde1c..510c08836 100644
--- a/bench/websocket-server/chat-client.mjs
+++ b/bench/websocket-server/chat-client.mjs
@@ -1,9 +1,4 @@
-const env =
- "process" in globalThis
- ? process.env
- : "Deno" in globalThis
- ? Deno.env.toObject()
- : {};
+const env = "process" in globalThis ? process.env : "Deno" in globalThis ? Deno.env.toObject() : {};
const SERVER = env.SERVER || "ws://0.0.0.0:4001";
const WebSocket = globalThis.WebSocket || (await import("ws")).WebSocket;
@@ -105,10 +100,10 @@ for (let i = 0; i < CLIENTS_TO_WAIT_FOR; i++) {
clients[i] = new WebSocket(`${SERVER}?name=${NAMES[i]}`);
promises.push(
new Promise((resolve, reject) => {
- clients[i].onmessage = (event) => {
+ clients[i].onmessage = event => {
resolve();
};
- })
+ }),
);
}
@@ -121,7 +116,7 @@ var more = false;
var remaining;
for (let i = 0; i < CLIENTS_TO_WAIT_FOR; i++) {
- clients[i].onmessage = (event) => {
+ clients[i].onmessage = event => {
if (LOG_MESSAGES) console.log(event.data);
received++;
remaining--;
@@ -160,7 +155,7 @@ setInterval(() => {
received = 0;
console.log(
last,
- `messages per second (${CLIENTS_TO_WAIT_FOR} clients x ${MESSAGES_TO_SEND.length} msg, min delay: ${DELAY}ms)`
+ `messages per second (${CLIENTS_TO_WAIT_FOR} clients x ${MESSAGES_TO_SEND.length} msg, min delay: ${DELAY}ms)`,
);
if (runs.length >= 10) {
diff --git a/bench/websocket-server/chat-server.bun.js b/bench/websocket-server/chat-server.bun.js
index b015dec7e..b4c71a6dc 100644
--- a/bench/websocket-server/chat-server.bun.js
+++ b/bench/websocket-server/chat-server.bun.js
@@ -38,9 +38,7 @@ const server = Bun.serve({
if (
server.upgrade(req, {
data: {
- name:
- new URL(req.url).searchParams.get("name") ||
- "Client #" + (CLIENTS_TO_WAIT_FOR - remainingClients),
+ name: new URL(req.url).searchParams.get("name") || "Client #" + (CLIENTS_TO_WAIT_FOR - remainingClients),
},
})
)
@@ -50,7 +48,4 @@ const server = Bun.serve({
},
});
-console.log(
- `Waiting for ${remainingClients} clients to connect...\n`,
- ` http://${server.hostname}:${port}/`
-);
+console.log(`Waiting for ${remainingClients} clients to connect...\n`, ` http://${server.hostname}:${port}/`);
diff --git a/bench/websocket-server/chat-server.deno.mjs b/bench/websocket-server/chat-server.deno.mjs
index 3cea9cf2f..5b2130bf2 100644
--- a/bench/websocket-server/chat-server.deno.mjs
+++ b/bench/websocket-server/chat-server.deno.mjs
@@ -1,7 +1,6 @@
// See ./README.md for instructions on how to run this benchmark.
const port = Deno.env.get("PORT") || 4001;
-const CLIENTS_TO_WAIT_FOR =
- parseInt(Deno.env.get("CLIENTS_COUNT") || "", 10) || 16;
+const CLIENTS_TO_WAIT_FOR = parseInt(Deno.env.get("CLIENTS_COUNT") || "", 10) || 16;
var clients = [];
async function reqHandler(req) {
@@ -13,11 +12,9 @@ async function reqHandler(req) {
clients.push(client);
const name = new URL(req.url).searchParams.get("name");
- console.log(
- `${name} connected (${CLIENTS_TO_WAIT_FOR - clients.length} remain)`
- );
+ console.log(`${name} connected (${CLIENTS_TO_WAIT_FOR - clients.length} remain)`);
- client.onmessage = (event) => {
+ client.onmessage = event => {
const msg = `${name}: ${event.data}`;
for (let client of clients) {
client.send(msg);
diff --git a/bench/websocket-server/chat-server.node.mjs b/bench/websocket-server/chat-server.node.mjs
index e57b9b982..5b74e5fbd 100644
--- a/bench/websocket-server/chat-server.node.mjs
+++ b/bench/websocket-server/chat-server.node.mjs
@@ -16,12 +16,8 @@ var WebSocketServer = require("ws").Server,
var clients = [];
wss.on("connection", function (ws, { url }) {
- const name = new URL(new URL(url, "http://localhost:3000")).searchParams.get(
- "name"
- );
- console.log(
- `${name} connected (${CLIENTS_TO_WAIT_FOR - clients.length} remain)`
- );
+ const name = new URL(new URL(url, "http://localhost:3000")).searchParams.get("name");
+ console.log(`${name} connected (${CLIENTS_TO_WAIT_FOR - clients.length} remain)`);
clients.push(ws);
ws.on("message", function (message) {
diff --git a/examples/html-rewriter.ts b/examples/html-rewriter.ts
index 877b957b7..3017350e7 100644
--- a/examples/html-rewriter.ts
+++ b/examples/html-rewriter.ts
@@ -3,29 +3,18 @@
Bun.serve({
async fetch(req) {
const { pathname } = new URL(req.url);
- if (
- !(pathname.startsWith("/https://") || pathname.startsWith("/http://"))
- ) {
- return new Response(
- "Enter a path that starts with https:// or http://\n",
- {
- status: 400,
- },
- );
+ if (!(pathname.startsWith("/https://") || pathname.startsWith("/http://"))) {
+ return new Response("Enter a path that starts with https:// or http://\n", {
+ status: 400,
+ });
}
- const response = await fetch(
- req.url.substring("http://localhost:3000/".length),
- req.clone(),
- );
+ const response = await fetch(req.url.substring("http://localhost:3000/".length), req.clone());
return new HTMLRewriter()
.on("a[href]", {
element(element) {
- element.setAttribute(
- "href",
- "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
- );
+ element.setAttribute("href", "https://www.youtube.com/watch?v=dQw4w9WgXcQ");
},
})
.transform(response);
diff --git a/examples/lambda.ts b/examples/lambda.ts
index da1a7d9ee..66746ecad 100644
--- a/examples/lambda.ts
+++ b/examples/lambda.ts
@@ -38,21 +38,17 @@ try {
} catch (e: any) {
console.error("Error loading sourcefile:", e);
try {
- await fetch(
- new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`)
- .href,
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- errorMessage: e.message,
- errorType: e.name,
- stackTrace: e?.stack?.split("\n") ?? [],
- }),
+ await fetch(new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`).href, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
},
- );
+ body: JSON.stringify({
+ errorMessage: e.message,
+ errorType: e.name,
+ stackTrace: e?.stack?.split("\n") ?? [],
+ }),
+ });
} catch (e2) {
console.error("Error sending error to runtime:", e2);
}
@@ -79,21 +75,17 @@ export default {
console.error(e);
try {
- await fetch(
- new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`)
- .href,
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- errorMessage: e.message,
- errorType: e.name,
- stackTrace: e?.stack?.split("\n") ?? [],
- }),
+ await fetch(new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`).href, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
},
- );
+ body: JSON.stringify({
+ errorMessage: e.message,
+ errorType: e.name,
+ stackTrace: e?.stack?.split("\n") ?? [],
+ }),
+ });
} catch (e2) {
console.error("Error sending error to runtime:", e2);
}
@@ -112,21 +104,17 @@ try {
} catch (e: any) {
console.error("Error parsing baseURI:", e);
try {
- await fetch(
- new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`)
- .href,
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- errorMessage: e.message,
- errorType: e.name,
- stackTrace: e?.stack?.split("\n") || [],
- }),
+ await fetch(new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`).href, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
},
- );
+ body: JSON.stringify({
+ errorMessage: e.message,
+ errorType: e.name,
+ stackTrace: e?.stack?.split("\n") || [],
+ }),
+ });
} catch (e2) {
console.error("Error sending error to runtime:", e2);
}
@@ -140,10 +128,7 @@ async function runHandler(response: Response) {
var request = new Request(baseURL.href, {
method,
headers: response.headers,
- body:
- parseInt(response.headers.get("Content-Length") || "0", 10) > 0
- ? await response.blob()
- : undefined,
+ body: parseInt(response.headers.get("Content-Length") || "0", 10) > 0 ? await response.blob() : undefined,
});
// we are done with the Response object here
// allow it to be GC'd
@@ -162,18 +147,15 @@ async function runHandler(response: Response) {
if (typeof process.env.VERBOSE !== "undefined") {
console.error(`[${traceID}] Error running handler:`, e1);
}
- fetch(
- `http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/error`,
- {
- method: "POST",
-
- body: JSON.stringify({
- errorMessage: e1.message,
- errorType: e1.name,
- stackTrace: e1?.stack?.split("\n") ?? [],
- }),
- },
- ).finally(noop);
+ fetch(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/error`, {
+ method: "POST",
+
+ body: JSON.stringify({
+ errorMessage: e1.message,
+ errorType: e1.name,
+ stackTrace: e1?.stack?.split("\n") ?? [],
+ }),
+ }).finally(noop);
return;
} finally {
if (typeof process.env.VERBOSE !== "undefined") {
@@ -182,28 +164,22 @@ async function runHandler(response: Response) {
}
if (!result || !("headers" in result)) {
- await fetch(
- `http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/error`,
- {
- method: "POST",
- body: JSON.stringify({
- errorMessage: "Expected Response object",
- errorType: "ExpectedResponseObject",
- stackTrace: [],
- }),
- },
- );
+ await fetch(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/error`, {
+ method: "POST",
+ body: JSON.stringify({
+ errorMessage: "Expected Response object",
+ errorType: "ExpectedResponseObject",
+ stackTrace: [],
+ }),
+ });
return;
}
- await fetch(
- `http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/response`,
- {
- method: "POST",
- headers: result.headers,
- body: await result.blob(),
- },
- );
+ await fetch(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/response`, {
+ method: "POST",
+ headers: result.headers,
+ body: await result.blob(),
+ });
(result as any) = undefined;
}
diff --git a/examples/macros/components/covid19.tsx b/examples/macros/components/covid19.tsx
index 330661c82..16877b5ce 100644
--- a/examples/macros/components/covid19.tsx
+++ b/examples/macros/components/covid19.tsx
@@ -1,13 +1,10 @@
import { fetchCSV } from "macro:fetchCSV";
export const Covid19 = () => {
- const rows = fetchCSV(
- "https://covid19.who.int/WHO-COVID-19-global-data.csv",
- {
- last: 100,
- columns: ["New_cases", "Date_reported", "Country"],
- },
- );
+ const rows = fetchCSV("https://covid19.who.int/WHO-COVID-19-global-data.csv", {
+ last: 100,
+ columns: ["New_cases", "Date_reported", "Country"],
+ });
return (
<div>
diff --git a/examples/macros/components/example.jsx b/examples/macros/components/example.jsx
index 84d2d92e9..6f2760b76 100644
--- a/examples/macros/components/example.jsx
+++ b/examples/macros/components/example.jsx
@@ -5,13 +5,11 @@ export const IPAddresses = () => (
<div>
<h2>recent ip addresses</h2>
<div className="Lines">
- {matchInFile("access.log", /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}/).map(
- (ipAddress, index) => (
- <div className="Line" key={index}>
- {ipAddress}
- </div>
- ),
- )}
+ {matchInFile("access.log", /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}/).map((ipAddress, index) => (
+ <div className="Line" key={index}>
+ {ipAddress}
+ </div>
+ ))}
</div>
</div>
);
diff --git a/examples/macros/fetchCSV.tsx b/examples/macros/fetchCSV.tsx
index b06b1e03e..55a12bc42 100644
--- a/examples/macros/fetchCSV.tsx
+++ b/examples/macros/fetchCSV.tsx
@@ -36,12 +36,12 @@ export async function fetchCSV(callExpression) {
rows = rows
.slice(Math.max(limit, rows.length) - limit)
.reverse()
- .filter((columns) => columns.every(Boolean));
+ .filter(columns => columns.every(Boolean));
const value = (
<array>
- {rows.map((columns) => (
+ {rows.map(columns => (
<array>
- {columnIndices.map((columnIndex) => (
+ {columnIndices.map(columnIndex => (
<string value={columns[columnIndex]} />
))}
</array>
diff --git a/examples/macros/matchInFile.tsx b/examples/macros/matchInFile.tsx
index bd1c92dea..e434d1dec 100644
--- a/examples/macros/matchInFile.tsx
+++ b/examples/macros/matchInFile.tsx
@@ -12,10 +12,10 @@ export function matchInFile(callExpression: BunAST.CallExpression) {
<array>
{file
.split("\n")
- .map((line) => line.match(matcher))
+ .map(line => line.match(matcher))
.filter(Boolean)
.reverse()
- .map((line) => (
+ .map(line => (
<string value={line[0]} />
))}
</array>
diff --git a/examples/macros/mystery-box.ts b/examples/macros/mystery-box.ts
index 6583c9868..c686f82c3 100644
--- a/examples/macros/mystery-box.ts
+++ b/examples/macros/mystery-box.ts
@@ -6,10 +6,7 @@ export function mysteryBox(callExpression) {
const count: number = parseInt(countString, 10);
// validate
- if (!(count >= 1 && count <= 1000))
- return new Error(
- `Argument ${countString} is expected to be between 1 and 1000`,
- );
+ if (!(count >= 1 && count <= 1000)) return new Error(`Argument ${countString} is expected to be between 1 and 1000`);
// return a value
return (Math.random() * count) | 0;
diff --git a/examples/openInEditor.js b/examples/openInEditor.js
index 59282c098..3c67f02c2 100644
--- a/examples/openInEditor.js
+++ b/examples/openInEditor.js
@@ -3,8 +3,7 @@ import { parse } from "querystring";
export default {
fetch(req) {
- if (req.url === "/favicon.ico")
- return new Response("nooo dont open favicon in editor", { status: 404 });
+ if (req.url === "/favicon.ico") return new Response("nooo dont open favicon in editor", { status: 404 });
var pathname = req.url.substring(1);
const q = pathname.indexOf("?");
diff --git a/examples/react-fast-refresh-test/src/main.tsx b/examples/react-fast-refresh-test/src/main.tsx
index 1a9948fe8..928d64b72 100644
--- a/examples/react-fast-refresh-test/src/main.tsx
+++ b/examples/react-fast-refresh-test/src/main.tsx
@@ -6,8 +6,7 @@ export const Main = ({ productName }) => {
<header>
<div className="Title">CSS HMR Stress Test</div>
<p className="Description">
- This page visually tests how quickly a bundler can update CSS over Hot
- Module Reloading.
+ This page visually tests how quickly a bundler can update CSS over Hot Module Reloading.
</p>
</header>
<main className="main">
@@ -21,9 +20,7 @@ export const Main = ({ productName }) => {
<div className="ProgressBar-container">
<div className="ProgressBar"></div>
</div>
- <div className="SectionLabel">
- The progress bar should move from left to right smoothly.
- </div>
+ <div className="SectionLabel">The progress bar should move from left to right smoothly.</div>
</section>
<section>
@@ -44,15 +41,11 @@ export const Main = ({ productName }) => {
<div className="Spinner"></div>
</div>
</div>
- <div className="SectionLabel">
- The spinners should rotate &amp; change color smoothly.
- </div>
+ <div className="SectionLabel">The spinners should rotate &amp; change color smoothly.</div>
</section>
</main>
<footer>
- <div className="SectionLabel FooterLabel">
- There are no CSS animations on this page.
- </div>
+ <div className="SectionLabel FooterLabel">There are no CSS animations on this page.</div>
<div className="Bundler-container">
<div className="Bundler">{productName}</div>
diff --git a/examples/react-file-system-router/index.tsx b/examples/react-file-system-router/index.tsx
index a784c393b..62d1151d5 100644
--- a/examples/react-file-system-router/index.tsx
+++ b/examples/react-file-system-router/index.tsx
@@ -1,24 +1,20 @@
// A simple way to connect FileSystemRouter to Bun#serve
// run with `bun run index.tsx`
-import { renderToReadableStream } from 'react-dom/server'
-import { FileSystemRouter } from 'bun'
+import { renderToReadableStream } from "react-dom/server";
+import { FileSystemRouter } from "bun";
export default {
port: 3000,
async fetch(request: Request) {
const router = new FileSystemRouter({
dir: process.cwd() + "/pages",
- style: "nextjs"
- })
+ style: "nextjs",
+ });
- const route = router.match(request)
+ const route = router.match(request);
- const { default: Root } = await import(route.filePath)
- return new Response(
- await renderToReadableStream(
- <Root {...route.params} />
- )
- )
- }
-} \ No newline at end of file
+ const { default: Root } = await import(route.filePath);
+ return new Response(await renderToReadableStream(<Root {...route.params} />));
+ },
+};
diff --git a/examples/react-file-system-router/pages/index.tsx b/examples/react-file-system-router/pages/index.tsx
index b2d9e735e..f1fe2a2e1 100644
--- a/examples/react-file-system-router/pages/index.tsx
+++ b/examples/react-file-system-router/pages/index.tsx
@@ -7,11 +7,11 @@ export default () => (
</head>
<body>
<h1>
- <a href="/one" >one</a>
+ <a href="/one">one</a>
</h1>
<h1>
- <a href="/two" >two</a>
+ <a href="/two">two</a>
</h1>
</body>
</html>
-) \ No newline at end of file
+);
diff --git a/examples/react-file-system-router/pages/one.tsx b/examples/react-file-system-router/pages/one.tsx
index 68c9fb4b9..b65a32f6c 100644
--- a/examples/react-file-system-router/pages/one.tsx
+++ b/examples/react-file-system-router/pages/one.tsx
@@ -9,4 +9,4 @@ export default () => (
<p>one</p>
</body>
</html>
-) \ No newline at end of file
+);
diff --git a/examples/react-file-system-router/pages/two.tsx b/examples/react-file-system-router/pages/two.tsx
index 09be9fa5c..c3d8beef9 100644
--- a/examples/react-file-system-router/pages/two.tsx
+++ b/examples/react-file-system-router/pages/two.tsx
@@ -9,4 +9,4 @@ export default () => (
<p>two</p>
</body>
</html>
-) \ No newline at end of file
+);
diff --git a/examples/sha.js b/examples/sha.js
index 0155aecc4..bb7382a03 100644
--- a/examples/sha.js
+++ b/examples/sha.js
@@ -1,20 +1,9 @@
-import {
- SHA1,
- SHA256,
- SHA512,
- SHA384,
- SHA512_256,
- MD5,
- MD4,
- RIPEMD160,
- sha,
-} from "bun";
+import { SHA1, SHA256, SHA512, SHA384, SHA512_256, MD5, MD4, RIPEMD160, sha } from "bun";
const input = "Hello World";
const [first, second] = input.split(" ");
-const log = (name, ...args) =>
- console.log(`${name}:`.padStart("SHA512_256: ".length), ...args);
+const log = (name, ...args) => console.log(`${name}:`.padStart("SHA512_256: ".length), ...args);
console.log("");
// This is SHA512-256:
diff --git a/examples/spawn.ts b/examples/spawn.ts
index d72a118b9..520fa60ff 100644
--- a/examples/spawn.ts
+++ b/examples/spawn.ts
@@ -7,9 +7,7 @@ const repo = process.argv.at(3) || "TheoBr/vercel-vite-demo";
const target = basename(repo) + "-main";
console.log("Downloading", repo, "to", "/tmp/" + target);
-const archive = await fetch(
- `https://github.com/${repo}/archive/refs/heads/main.tar.gz`,
-);
+const archive = await fetch(`https://github.com/${repo}/archive/refs/heads/main.tar.gz`);
// remove the directory if it already exists locally
rmSync("/tmp/" + target, { recursive: true, force: true });
diff --git a/misctools/gen-unicode-table.js b/misctools/gen-unicode-table.js
index ad38a0ec5..1696a4b9e 100644
--- a/misctools/gen-unicode-table.js
+++ b/misctools/gen-unicode-table.js
@@ -58,18 +58,12 @@ const idContinueESNext = require("@unicode/unicode-13.0.0/Binary_Property/ID_Con
const idContinueESNextSet = new Set(idContinueESNext);
// These identifiers are valid in both ES5 and ES6+ (i.e. an intersection of both)
-const idStartES5AndESNext = idStartES5.filter((n) => idStartESNextSet.has(n));
-const idContinueES5AndESNext = idContinueES5.filter((n) =>
- idContinueESNextSet.has(n),
-);
+const idStartES5AndESNext = idStartES5.filter(n => idStartESNextSet.has(n));
+const idContinueES5AndESNext = idContinueES5.filter(n => idContinueESNextSet.has(n));
// These identifiers are valid in either ES5 or ES6+ (i.e. a union of both)
-const idStartES5OrESNext = [...new Set(idStartES5.concat(idStartESNext))].sort(
- (a, b) => a - b,
-);
-const idContinueES5OrESNext = [
- ...new Set(idContinueES5.concat(idContinueESNext)),
-].sort((a, b) => a - b);
+const idStartES5OrESNext = [...new Set(idStartES5.concat(idStartESNext))].sort((a, b) => a - b);
+const idContinueES5OrESNext = [...new Set(idContinueES5.concat(idContinueESNext))].sort((a, b) => a - b);
function generateRangeTable(codePoints) {
let lines = [];
@@ -86,11 +80,7 @@ function generateRangeTable(codePoints) {
while (index < codePoints.length && codePoints[index] < 0x1000) {
let start = codePoints[index];
index++;
- while (
- index < codePoints.length &&
- codePoints[index] < 0x1000 &&
- codePoints[index] === codePoints[index - 1] + 1
- ) {
+ while (index < codePoints.length && codePoints[index] < 0x1000 && codePoints[index] === codePoints[index - 1] + 1) {
index++;
}
let end = codePoints[index - 1];
@@ -103,10 +93,7 @@ function generateRangeTable(codePoints) {
while (index < codePoints.length) {
let start = codePoints[index];
index++;
- while (
- index < codePoints.length &&
- codePoints[index] === codePoints[index - 1] + 1
- ) {
+ while (index < codePoints.length && codePoints[index] === codePoints[index - 1] + 1) {
index++;
}
let end = codePoints[index - 1];
@@ -132,11 +119,7 @@ function generateBigSwitchStatement(codePoints) {
while (index < codePoints.length && codePoints[index] < 0x1000) {
let start = codePoints[index];
index++;
- while (
- index < codePoints.length &&
- codePoints[index] < 0x1000 &&
- codePoints[index] === codePoints[index - 1] + 1
- ) {
+ while (index < codePoints.length && codePoints[index] < 0x1000 && codePoints[index] === codePoints[index - 1] + 1) {
index++;
}
let end = codePoints[index - 1];
@@ -147,10 +130,7 @@ function generateBigSwitchStatement(codePoints) {
while (index < codePoints.length) {
let start = codePoints[index];
index++;
- while (
- index < codePoints.length &&
- codePoints[index] === codePoints[index - 1] + 1
- ) {
+ while (index < codePoints.length && codePoints[index] === codePoints[index - 1] + 1) {
index++;
}
let end = codePoints[index - 1];
@@ -165,9 +145,7 @@ function generateBigSwitchStatement(codePoints) {
fs.writeFileSync(
path.join(__dirname, "..", "src", "js_lexer", "unicode.zig"),
- `// This file was automatically generated by ${path.basename(
- __filename,
- )}. Do not edit.
+ `// This file was automatically generated by ${path.basename(__filename)}. Do not edit.
const RangeTable = @import("./range_table.zig");
diff --git a/misctools/headers-cleaner.js b/misctools/headers-cleaner.js
index 0f003cc5c..9c74e1ba3 100644
--- a/misctools/headers-cleaner.js
+++ b/misctools/headers-cleaner.js
@@ -3,10 +3,7 @@ var { readFileSync, writeFileSync } = require("fs");
var { join } = require("path");
const destination = join(__dirname, "../src/bun.js/bindings/headers.zig");
-const replacements = join(
- __dirname,
- "../src/bun.js/bindings/headers-replacements.zig",
-);
+const replacements = join(__dirname, "../src/bun.js/bindings/headers-replacements.zig");
console.log("Writing to", destination);
var output = "// GENERATED CODE - DO NOT MODIFY BY HAND\n\n";
@@ -16,16 +13,9 @@ const first_extern = input.indexOf("extern fn");
const first_extern_line = input.indexOf("\n", first_extern - 128);
const last_extern_fn = input.lastIndexOf("extern");
const last_extern_fn_line = input.indexOf("\n", last_extern_fn);
-const keep = (
- input.substring(0, first_extern_line) + input.substring(last_extern_fn_line)
-)
+const keep = (input.substring(0, first_extern_line) + input.substring(last_extern_fn_line))
.split("\n")
- .filter(
- (a) =>
- /const (JSC|WTF|Web)_/gi.test(a) &&
- !a.includes("JSValue") &&
- !a.includes("CatchScope"),
- )
+ .filter(a => /const (JSC|WTF|Web)_/gi.test(a) && !a.includes("JSValue") && !a.includes("CatchScope"))
.join("\n")
.trim();
@@ -34,21 +24,12 @@ input = input.replaceAll("*WebCore__", "*bindings.");
input = input.replaceAll("*JSC__", "*bindings.");
input = input.replaceAll("[*c] JSC__", "[*c]bindings.");
input = input.replaceAll("[*c]JSC__", "[*c]bindings.");
-input = input.replaceAll(
- "[*c]bindings.JSGlobalObject",
- "*bindings.JSGlobalObject",
-);
+input = input.replaceAll("[*c]bindings.JSGlobalObject", "*bindings.JSGlobalObject");
input = input.replaceAll("[*c]bindings.JSPromise", "?*bindings.JSPromise");
-input = input.replaceAll(
- "[*c]const bindings.JSPromise",
- "?*const bindings.JSPromise",
-);
+input = input.replaceAll("[*c]const bindings.JSPromise", "?*const bindings.JSPromise");
input = input.replaceAll("[*c] const JSC__", "[*c]const bindings.");
-input = input.replaceAll(
- "[*c]Inspector__ScriptArguments",
- "[*c]bindings.ScriptArguments",
-);
+input = input.replaceAll("[*c]Inspector__ScriptArguments", "[*c]bindings.ScriptArguments");
input = input
.replaceAll("VirtualMachine", "bindings.VirtualMachine")
@@ -104,14 +85,6 @@ for (let i = 0; i < lines.length; i++) {
continue;
}
}
-input = lines.filter((a) => a.length > 0).join("\n");
+input = lines.filter(a => a.length > 0).join("\n");
-writeFileSync(
- destination,
- output +
- "\n" +
- readFileSync(replacements, "utf8").trim() +
- "\n" +
- input.trim() +
- "\n",
-);
+writeFileSync(destination, output + "\n" + readFileSync(replacements, "utf8").trim() + "\n" + input.trim() + "\n");
diff --git a/misctools/mime.js b/misctools/mime.js
index 6f46a711f..27b58a5b7 100644
--- a/misctools/mime.js
+++ b/misctools/mime.js
@@ -1,17 +1,6 @@
-const json = await (
- await fetch("https://raw.githubusercontent.com/jshttp/mime-db/master/db.json")
-).json();
-
-json["application/javascript"].extensions.push(
- `ts`,
- `tsx`,
- `mts`,
- `mtsx`,
- `cts`,
- `cjs`,
- `mjs`,
- `js`,
-);
+const json = await (await fetch("https://raw.githubusercontent.com/jshttp/mime-db/master/db.json")).json();
+
+json["application/javascript"].extensions.push(`ts`, `tsx`, `mts`, `mtsx`, `cts`, `cjs`, `mjs`, `js`);
delete json["application/node"];
delete json["application/deno"];
@@ -28,11 +17,11 @@ for (let key of Object.keys(json).sort()) {
const withExtensions = [
...new Set([
...Object.keys(json)
- .filter((key) => {
+ .filter(key => {
return !!json[key]?.extensions?.length;
})
- .flatMap((mime) => {
- return [...new Set([...json[mime].extensions])].map((ext) => {
+ .flatMap(mime => {
+ return [...new Set([...json[mime].extensions])].map(ext => {
return [`.{.@"${ext}", all.@"${mime}"}`];
});
})
diff --git a/misctools/publish-examples.js b/misctools/publish-examples.js
index 4124d0785..dcbb0d3eb 100644
--- a/misctools/publish-examples.js
+++ b/misctools/publish-examples.js
@@ -14,10 +14,7 @@ const DRY_RUN = !!process.env.DRY_RUN;
var count = 0;
-const examplesFolderEntries = fs.readdirSync(
- path.join(process.cwd(), "examples"),
- { withFileTypes: true },
-);
+const examplesFolderEntries = fs.readdirSync(path.join(process.cwd(), "examples"), { withFileTypes: true });
const packageNames = [];
@@ -28,10 +25,7 @@ for (let folder of examplesFolderEntries) {
let packageJSONText;
try {
- packageJSONText = fs.readFileSync(
- path.join(absolute, "package.json"),
- "utf8",
- );
+ packageJSONText = fs.readFileSync(path.join(absolute, "package.json"), "utf8");
} catch {
continue;
}
@@ -43,9 +37,7 @@ for (let folder of examplesFolderEntries) {
var version = "0.0.1";
try {
- const _versions = exec(`npm view ${packageJSON.name} versions --json`)
- .toString()
- .trim();
+ const _versions = exec(`npm view ${packageJSON.name} versions --json`).toString().trim();
if (_versions.length > 0) {
const versionsArray = JSON.parse(_versions);
@@ -70,10 +62,7 @@ for (let folder of examplesFolderEntries) {
} catch (exception) {}
try {
- fs.copyFileSync(
- path.join(absolute, ".gitignore"),
- path.join(absolute, "gitignore"),
- );
+ fs.copyFileSync(path.join(absolute, ".gitignore"), path.join(absolute, "gitignore"));
} catch (exception) {}
restart: while (retryCount-- > 0) {
@@ -85,18 +74,13 @@ for (let folder of examplesFolderEntries) {
delete packageJSON.main;
}
- fs.writeFileSync(
- path.join(absolute, "package.json"),
- JSON.stringify(packageJSON, null, 2),
- );
+ fs.writeFileSync(path.join(absolute, "package.json"), JSON.stringify(packageJSON, null, 2));
try {
exec(`npm version patch --force --no-commit-hooks --no-git-tag-version`, {
cwd: absolute,
});
- packageJSON = JSON.parse(
- fs.readFileSync(path.join(absolute, "package.json"), "utf8"),
- );
+ packageJSON = JSON.parse(fs.readFileSync(path.join(absolute, "package.json"), "utf8"));
version = packageJSON.version;
} catch (e) {
if (e.code !== "E404") {
@@ -105,12 +89,9 @@ for (let folder of examplesFolderEntries) {
}
try {
- exec(
- `npm publish ${
- DRY_RUN ? "--dry-run" : ""
- } --access public --registry https://registry.npmjs.org/`,
- { cwd: absolute },
- );
+ exec(`npm publish ${DRY_RUN ? "--dry-run" : ""} --access public --registry https://registry.npmjs.org/`, {
+ cwd: absolute,
+ });
packageNames.push([
packageJSON.name,
{
@@ -147,16 +128,10 @@ if (packageNames.length > 0) {
recursive: true,
});
} catch (exception) {}
- fs.writeFileSync(
- path.join(dir, "package.json"),
- JSON.stringify(packageJSON, null, 2),
- );
- exec(
- `npm publish ${
- DRY_RUN ? "--dry-run" : ""
- } --access public --registry https://registry.npmjs.org/`,
- { cwd: dir },
- );
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify(packageJSON, null, 2));
+ exec(`npm publish ${DRY_RUN ? "--dry-run" : ""} --access public --registry https://registry.npmjs.org/`, {
+ cwd: dir,
+ });
}
console.log(`Published ${count} packages`);
diff --git a/package.json b/package.json
index 07813aaa9..37d02bca0 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"build-fallback": "esbuild --target=esnext --bundle src/fallback.ts --format=iife --platform=browser --minify > src/fallback.out.js",
"postinstall": "bash .scripts/postinstall.sh",
"typecheck": "tsc",
- "fmt": "prettier --write './**/*.{ts,tsx,js,jsx}' --config .prettierrc",
+ "fmt": "prettier --write './test/**/*.{mjs,ts,tsx,js,jsx}' './src/*.{mjs,ts,tsx,js,jsx}' './src/*/*.{mjs,ts,tsx,js,jsx}' './src/*/*/*.{mjs,ts,tsx,js,jsx}' './bench/*.{mjs,ts,tsx,js,jsx}' --config .prettierrc.cjs",
"lint": "eslint './**/*.d.ts' --cache",
"lint:fix": "eslint './**/*.d.ts' --cache --fix"
},
diff --git a/src/api/demo/lib/api.ts b/src/api/demo/lib/api.ts
index d06bfd35b..88dd71001 100644
--- a/src/api/demo/lib/api.ts
+++ b/src/api/demo/lib/api.ts
@@ -13,9 +13,7 @@ export interface WebAssemblyModule {
}
const wasm_imports_sym: symbol | string =
- process.env.NODE_ENV === "development"
- ? "wasm_imports"
- : Symbol("wasm_imports");
+ process.env.NODE_ENV === "development" ? "wasm_imports" : Symbol("wasm_imports");
const ptr_converter = new ArrayBuffer(16);
const ptr_float = new BigUint64Array(ptr_converter);
@@ -150,10 +148,10 @@ export class Bun {
return;
}
- Bun.wasm_source = await globalThis.WebAssembly.instantiateStreaming(
- fetch(url),
- { env: Bun[wasm_imports_sym], wasi_snapshot_preview1: Wasi },
- );
+ Bun.wasm_source = await globalThis.WebAssembly.instantiateStreaming(fetch(url), {
+ env: Bun[wasm_imports_sym],
+ wasi_snapshot_preview1: Wasi,
+ });
const res = Bun.wasm_exports.init();
if (res < 0) {
@@ -225,11 +223,7 @@ export class Bun {
return response;
}
- static scan(
- content: Uint8Array | string,
- file_name: string,
- loader?: Loader,
- ) {
+ static scan(content: Uint8Array | string, file_name: string, loader?: Loader) {
if (!Bun.has_initialized) {
throw "Please run await Bun.init(wasm_url) before using this.";
}
diff --git a/src/api/demo/pages/index.tsx b/src/api/demo/pages/index.tsx
index 24577acb3..1f6e4bb82 100644
--- a/src/api/demo/pages/index.tsx
+++ b/src/api/demo/pages/index.tsx
@@ -14,10 +14,7 @@ export async function getStaticProps(ctx) {
return {
props: {
// not tested
- code: readFile(
- "/Users/jarred/Build/es-module-lexer/test/samples/magic-string.js",
- { encoding: "utf-8" },
- ),
+ code: readFile("/Users/jarred/Build/es-module-lexer/test/samples/magic-string.js", { encoding: "utf-8" }),
},
};
}
@@ -33,11 +30,8 @@ export default function Home({ code }) {
}, []);
const runBuild = React.useCallback(
- (event) => {
- globalThis.Run.transform(
- event.target.value,
- fileNameRef?.current?.value,
- ).then((result) => {
+ event => {
+ globalThis.Run.transform(event.target.value, fileNameRef?.current?.value).then(result => {
setEsbuildResult(result.esbuild.code);
setBunResult(textDecoder.decode(result.bun.files[0].data));
setSWCResult(result.swc.code);
diff --git a/src/api/demo/pages/scan.tsx b/src/api/demo/pages/scan.tsx
index 87cebd64d..656629dda 100644
--- a/src/api/demo/pages/scan.tsx
+++ b/src/api/demo/pages/scan.tsx
@@ -13,10 +13,7 @@ export async function getStaticProps(ctx) {
return {
props: {
// not tested
- code: readFile(
- "/Users/jarred/Build/es-module-lexer/test/samples/magic-string.js",
- { encoding: "utf-8" },
- ),
+ code: readFile("/Users/jarred/Build/es-module-lexer/test/samples/magic-string.js", { encoding: "utf-8" }),
defaultFile: "magic-string.js",
},
};
@@ -33,11 +30,8 @@ export default function Home({ code, defaultFile }) {
}, []);
const runBuild = React.useCallback(
- (event) => {
- globalThis.Scan.transform(
- event.target.value,
- fileNameRef?.current?.value,
- ).then((result) => {
+ event => {
+ globalThis.Scan.transform(event.target.value, fileNameRef?.current?.value).then(result => {
setLexer(JSON.stringify(result.lexer, null, 2));
setBunResult(JSON.stringify(result.bun, null, 2));
}, console.error);
@@ -59,7 +53,7 @@ export default function Home({ code, defaultFile }) {
type="text"
placeholder="filename"
value={file}
- onChange={(event) => setFile(event.target.value)}
+ onChange={event => setFile(event.target.value)}
ref={fileNameRef}
/>
<textarea onChange={runBuild} defaultValue={code}></textarea>
diff --git a/src/api/demo/schema.d.ts b/src/api/demo/schema.d.ts
index ae4551128..6f3949c77 100644
--- a/src/api/demo/schema.d.ts
+++ b/src/api/demo/schema.d.ts
@@ -683,228 +683,90 @@ export interface BunInstall {
global_bin_dir?: string;
}
-export declare function encodeStackFrame(
- message: StackFrame,
- bb: ByteBuffer,
-): void;
+export declare function encodeStackFrame(message: StackFrame, bb: ByteBuffer): void;
export declare function decodeStackFrame(buffer: ByteBuffer): StackFrame;
-export declare function encodeStackFramePosition(
- message: StackFramePosition,
- bb: ByteBuffer,
-): void;
-export declare function decodeStackFramePosition(
- buffer: ByteBuffer,
-): StackFramePosition;
-export declare function encodeSourceLine(
- message: SourceLine,
- bb: ByteBuffer,
-): void;
+export declare function encodeStackFramePosition(message: StackFramePosition, bb: ByteBuffer): void;
+export declare function decodeStackFramePosition(buffer: ByteBuffer): StackFramePosition;
+export declare function encodeSourceLine(message: SourceLine, bb: ByteBuffer): void;
export declare function decodeSourceLine(buffer: ByteBuffer): SourceLine;
-export declare function encodeStackTrace(
- message: StackTrace,
- bb: ByteBuffer,
-): void;
+export declare function encodeStackTrace(message: StackTrace, bb: ByteBuffer): void;
export declare function decodeStackTrace(buffer: ByteBuffer): StackTrace;
-export declare function encodeJSException(
- message: JSException,
- bb: ByteBuffer,
-): void;
+export declare function encodeJSException(message: JSException, bb: ByteBuffer): void;
export declare function decodeJSException(buffer: ByteBuffer): JSException;
export declare function encodeProblems(message: Problems, bb: ByteBuffer): void;
export declare function decodeProblems(buffer: ByteBuffer): Problems;
export declare function encodeRouter(message: Router, bb: ByteBuffer): void;
export declare function decodeRouter(buffer: ByteBuffer): Router;
-export declare function encodeFallbackMessageContainer(
- message: FallbackMessageContainer,
- bb: ByteBuffer,
-): void;
-export declare function decodeFallbackMessageContainer(
- buffer: ByteBuffer,
-): FallbackMessageContainer;
+export declare function encodeFallbackMessageContainer(message: FallbackMessageContainer, bb: ByteBuffer): void;
+export declare function decodeFallbackMessageContainer(buffer: ByteBuffer): FallbackMessageContainer;
export declare function encodeJSX(message: JSX, bb: ByteBuffer): void;
export declare function decodeJSX(buffer: ByteBuffer): JSX;
-export declare function encodeStringPointer(
- message: StringPointer,
- bb: ByteBuffer,
-): void;
+export declare function encodeStringPointer(message: StringPointer, bb: ByteBuffer): void;
export declare function decodeStringPointer(buffer: ByteBuffer): StringPointer;
-export declare function encodeJavascriptBundledModule(
- message: JavascriptBundledModule,
- bb: ByteBuffer,
-): void;
-export declare function decodeJavascriptBundledModule(
- buffer: ByteBuffer,
-): JavascriptBundledModule;
-export declare function encodeJavascriptBundledPackage(
- message: JavascriptBundledPackage,
- bb: ByteBuffer,
-): void;
-export declare function decodeJavascriptBundledPackage(
- buffer: ByteBuffer,
-): JavascriptBundledPackage;
-export declare function encodeJavascriptBundle(
- message: JavascriptBundle,
- bb: ByteBuffer,
-): void;
-export declare function decodeJavascriptBundle(
- buffer: ByteBuffer,
-): JavascriptBundle;
-export declare function encodeJavascriptBundleContainer(
- message: JavascriptBundleContainer,
- bb: ByteBuffer,
-): void;
-export declare function decodeJavascriptBundleContainer(
- buffer: ByteBuffer,
-): JavascriptBundleContainer;
-export declare function encodeModuleImportRecord(
- message: ModuleImportRecord,
- bb: ByteBuffer,
-): void;
-export declare function decodeModuleImportRecord(
- buffer: ByteBuffer,
-): ModuleImportRecord;
+export declare function encodeJavascriptBundledModule(message: JavascriptBundledModule, bb: ByteBuffer): void;
+export declare function decodeJavascriptBundledModule(buffer: ByteBuffer): JavascriptBundledModule;
+export declare function encodeJavascriptBundledPackage(message: JavascriptBundledPackage, bb: ByteBuffer): void;
+export declare function decodeJavascriptBundledPackage(buffer: ByteBuffer): JavascriptBundledPackage;
+export declare function encodeJavascriptBundle(message: JavascriptBundle, bb: ByteBuffer): void;
+export declare function decodeJavascriptBundle(buffer: ByteBuffer): JavascriptBundle;
+export declare function encodeJavascriptBundleContainer(message: JavascriptBundleContainer, bb: ByteBuffer): void;
+export declare function decodeJavascriptBundleContainer(buffer: ByteBuffer): JavascriptBundleContainer;
+export declare function encodeModuleImportRecord(message: ModuleImportRecord, bb: ByteBuffer): void;
+export declare function decodeModuleImportRecord(buffer: ByteBuffer): ModuleImportRecord;
export declare function encodeModule(message: Module, bb: ByteBuffer): void;
export declare function decodeModule(buffer: ByteBuffer): Module;
-export declare function encodeStringMap(
- message: StringMap,
- bb: ByteBuffer,
-): void;
+export declare function encodeStringMap(message: StringMap, bb: ByteBuffer): void;
export declare function decodeStringMap(buffer: ByteBuffer): StringMap;
-export declare function encodeLoaderMap(
- message: LoaderMap,
- bb: ByteBuffer,
-): void;
+export declare function encodeLoaderMap(message: LoaderMap, bb: ByteBuffer): void;
export declare function decodeLoaderMap(buffer: ByteBuffer): LoaderMap;
-export declare function encodeEnvConfig(
- message: EnvConfig,
- bb: ByteBuffer,
-): void;
+export declare function encodeEnvConfig(message: EnvConfig, bb: ByteBuffer): void;
export declare function decodeEnvConfig(buffer: ByteBuffer): EnvConfig;
-export declare function encodeLoadedEnvConfig(
- message: LoadedEnvConfig,
- bb: ByteBuffer,
-): void;
-export declare function decodeLoadedEnvConfig(
- buffer: ByteBuffer,
-): LoadedEnvConfig;
-export declare function encodeFrameworkConfig(
- message: FrameworkConfig,
- bb: ByteBuffer,
-): void;
-export declare function decodeFrameworkConfig(
- buffer: ByteBuffer,
-): FrameworkConfig;
-export declare function encodeFrameworkEntryPoint(
- message: FrameworkEntryPoint,
- bb: ByteBuffer,
-): void;
-export declare function decodeFrameworkEntryPoint(
- buffer: ByteBuffer,
-): FrameworkEntryPoint;
-export declare function encodeFrameworkEntryPointMap(
- message: FrameworkEntryPointMap,
- bb: ByteBuffer,
-): void;
-export declare function decodeFrameworkEntryPointMap(
- buffer: ByteBuffer,
-): FrameworkEntryPointMap;
-export declare function encodeFrameworkEntryPointMessage(
- message: FrameworkEntryPointMessage,
- bb: ByteBuffer,
-): void;
-export declare function decodeFrameworkEntryPointMessage(
- buffer: ByteBuffer,
-): FrameworkEntryPointMessage;
-export declare function encodeLoadedFramework(
- message: LoadedFramework,
- bb: ByteBuffer,
-): void;
-export declare function decodeLoadedFramework(
- buffer: ByteBuffer,
-): LoadedFramework;
-export declare function encodeLoadedRouteConfig(
- message: LoadedRouteConfig,
- bb: ByteBuffer,
-): void;
-export declare function decodeLoadedRouteConfig(
- buffer: ByteBuffer,
-): LoadedRouteConfig;
-export declare function encodeRouteConfig(
- message: RouteConfig,
- bb: ByteBuffer,
-): void;
+export declare function encodeLoadedEnvConfig(message: LoadedEnvConfig, bb: ByteBuffer): void;
+export declare function decodeLoadedEnvConfig(buffer: ByteBuffer): LoadedEnvConfig;
+export declare function encodeFrameworkConfig(message: FrameworkConfig, bb: ByteBuffer): void;
+export declare function decodeFrameworkConfig(buffer: ByteBuffer): FrameworkConfig;
+export declare function encodeFrameworkEntryPoint(message: FrameworkEntryPoint, bb: ByteBuffer): void;
+export declare function decodeFrameworkEntryPoint(buffer: ByteBuffer): FrameworkEntryPoint;
+export declare function encodeFrameworkEntryPointMap(message: FrameworkEntryPointMap, bb: ByteBuffer): void;
+export declare function decodeFrameworkEntryPointMap(buffer: ByteBuffer): FrameworkEntryPointMap;
+export declare function encodeFrameworkEntryPointMessage(message: FrameworkEntryPointMessage, bb: ByteBuffer): void;
+export declare function decodeFrameworkEntryPointMessage(buffer: ByteBuffer): FrameworkEntryPointMessage;
+export declare function encodeLoadedFramework(message: LoadedFramework, bb: ByteBuffer): void;
+export declare function decodeLoadedFramework(buffer: ByteBuffer): LoadedFramework;
+export declare function encodeLoadedRouteConfig(message: LoadedRouteConfig, bb: ByteBuffer): void;
+export declare function decodeLoadedRouteConfig(buffer: ByteBuffer): LoadedRouteConfig;
+export declare function encodeRouteConfig(message: RouteConfig, bb: ByteBuffer): void;
export declare function decodeRouteConfig(buffer: ByteBuffer): RouteConfig;
-export declare function encodeTransformOptions(
- message: TransformOptions,
- bb: ByteBuffer,
-): void;
-export declare function decodeTransformOptions(
- buffer: ByteBuffer,
-): TransformOptions;
-export declare function encodeFileHandle(
- message: FileHandle,
- bb: ByteBuffer,
-): void;
+export declare function encodeTransformOptions(message: TransformOptions, bb: ByteBuffer): void;
+export declare function decodeTransformOptions(buffer: ByteBuffer): TransformOptions;
+export declare function encodeFileHandle(message: FileHandle, bb: ByteBuffer): void;
export declare function decodeFileHandle(buffer: ByteBuffer): FileHandle;
-export declare function encodeTransform(
- message: Transform,
- bb: ByteBuffer,
-): void;
+export declare function encodeTransform(message: Transform, bb: ByteBuffer): void;
export declare function decodeTransform(buffer: ByteBuffer): Transform;
export declare function encodeScan(message: Scan, bb: ByteBuffer): void;
export declare function decodeScan(buffer: ByteBuffer): Scan;
-export declare function encodeScanResult(
- message: ScanResult,
- bb: ByteBuffer,
-): void;
+export declare function encodeScanResult(message: ScanResult, bb: ByteBuffer): void;
export declare function decodeScanResult(buffer: ByteBuffer): ScanResult;
-export declare function encodeScannedImport(
- message: ScannedImport,
- bb: ByteBuffer,
-): void;
+export declare function encodeScannedImport(message: ScannedImport, bb: ByteBuffer): void;
export declare function decodeScannedImport(buffer: ByteBuffer): ScannedImport;
-export declare function encodeOutputFile(
- message: OutputFile,
- bb: ByteBuffer,
-): void;
+export declare function encodeOutputFile(message: OutputFile, bb: ByteBuffer): void;
export declare function decodeOutputFile(buffer: ByteBuffer): OutputFile;
-export declare function encodeTransformResponse(
- message: TransformResponse,
- bb: ByteBuffer,
-): void;
-export declare function decodeTransformResponse(
- buffer: ByteBuffer,
-): TransformResponse;
+export declare function encodeTransformResponse(message: TransformResponse, bb: ByteBuffer): void;
+export declare function decodeTransformResponse(buffer: ByteBuffer): TransformResponse;
export declare function encodeLocation(message: Location, bb: ByteBuffer): void;
export declare function decodeLocation(buffer: ByteBuffer): Location;
-export declare function encodeMessageData(
- message: MessageData,
- bb: ByteBuffer,
-): void;
+export declare function encodeMessageData(message: MessageData, bb: ByteBuffer): void;
export declare function decodeMessageData(buffer: ByteBuffer): MessageData;
-export declare function encodeMessageMeta(
- message: MessageMeta,
- bb: ByteBuffer,
-): void;
+export declare function encodeMessageMeta(message: MessageMeta, bb: ByteBuffer): void;
export declare function decodeMessageMeta(buffer: ByteBuffer): MessageMeta;
export declare function encodeMessage(message: Message, bb: ByteBuffer): void;
export declare function decodeMessage(buffer: ByteBuffer): Message;
export declare function encodeLog(message: Log, bb: ByteBuffer): void;
export declare function decodeLog(buffer: ByteBuffer): Log;
-export declare function encodeWebsocketMessage(
- message: WebsocketMessage,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketMessage(
- buffer: ByteBuffer,
-): WebsocketMessage;
-export declare function encodeWebsocketMessageWelcome(
- message: WebsocketMessageWelcome,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketMessageWelcome(
- buffer: ByteBuffer,
-): WebsocketMessageWelcome;
+export declare function encodeWebsocketMessage(message: WebsocketMessage, bb: ByteBuffer): void;
+export declare function decodeWebsocketMessage(buffer: ByteBuffer): WebsocketMessage;
+export declare function encodeWebsocketMessageWelcome(message: WebsocketMessageWelcome, bb: ByteBuffer): void;
+export declare function decodeWebsocketMessageWelcome(buffer: ByteBuffer): WebsocketMessageWelcome;
export declare function encodeWebsocketMessageFileChangeNotification(
message: WebsocketMessageFileChangeNotification,
bb: ByteBuffer,
@@ -912,69 +774,26 @@ export declare function encodeWebsocketMessageFileChangeNotification(
export declare function decodeWebsocketMessageFileChangeNotification(
buffer: ByteBuffer,
): WebsocketMessageFileChangeNotification;
-export declare function encodeWebsocketCommand(
- message: WebsocketCommand,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketCommand(
- buffer: ByteBuffer,
-): WebsocketCommand;
-export declare function encodeWebsocketCommandBuild(
- message: WebsocketCommandBuild,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketCommandBuild(
- buffer: ByteBuffer,
-): WebsocketCommandBuild;
-export declare function encodeWebsocketCommandManifest(
- message: WebsocketCommandManifest,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketCommandManifest(
- buffer: ByteBuffer,
-): WebsocketCommandManifest;
-export declare function encodeWebsocketMessageBuildSuccess(
- message: WebsocketMessageBuildSuccess,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketMessageBuildSuccess(
- buffer: ByteBuffer,
-): WebsocketMessageBuildSuccess;
-export declare function encodeWebsocketMessageBuildFailure(
- message: WebsocketMessageBuildFailure,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketMessageBuildFailure(
- buffer: ByteBuffer,
-): WebsocketMessageBuildFailure;
+export declare function encodeWebsocketCommand(message: WebsocketCommand, bb: ByteBuffer): void;
+export declare function decodeWebsocketCommand(buffer: ByteBuffer): WebsocketCommand;
+export declare function encodeWebsocketCommandBuild(message: WebsocketCommandBuild, bb: ByteBuffer): void;
+export declare function decodeWebsocketCommandBuild(buffer: ByteBuffer): WebsocketCommandBuild;
+export declare function encodeWebsocketCommandManifest(message: WebsocketCommandManifest, bb: ByteBuffer): void;
+export declare function decodeWebsocketCommandManifest(buffer: ByteBuffer): WebsocketCommandManifest;
+export declare function encodeWebsocketMessageBuildSuccess(message: WebsocketMessageBuildSuccess, bb: ByteBuffer): void;
+export declare function decodeWebsocketMessageBuildSuccess(buffer: ByteBuffer): WebsocketMessageBuildSuccess;
+export declare function encodeWebsocketMessageBuildFailure(message: WebsocketMessageBuildFailure, bb: ByteBuffer): void;
+export declare function decodeWebsocketMessageBuildFailure(buffer: ByteBuffer): WebsocketMessageBuildFailure;
export declare function encodeWebsocketCommandBuildWithFilePath(
message: WebsocketCommandBuildWithFilePath,
bb: ByteBuffer,
): void;
-export declare function decodeWebsocketCommandBuildWithFilePath(
- buffer: ByteBuffer,
-): WebsocketCommandBuildWithFilePath;
-export declare function encodeWebsocketMessageResolveID(
- message: WebsocketMessageResolveID,
- bb: ByteBuffer,
-): void;
-export declare function decodeWebsocketMessageResolveID(
- buffer: ByteBuffer,
-): WebsocketMessageResolveID;
-export declare function encodeNPMRegistry(
- message: NPMRegistry,
- bb: ByteBuffer,
-): void;
+export declare function decodeWebsocketCommandBuildWithFilePath(buffer: ByteBuffer): WebsocketCommandBuildWithFilePath;
+export declare function encodeWebsocketMessageResolveID(message: WebsocketMessageResolveID, bb: ByteBuffer): void;
+export declare function decodeWebsocketMessageResolveID(buffer: ByteBuffer): WebsocketMessageResolveID;
+export declare function encodeNPMRegistry(message: NPMRegistry, bb: ByteBuffer): void;
export declare function decodeNPMRegistry(buffer: ByteBuffer): NPMRegistry;
-export declare function encodeNPMRegistryMap(
- message: NPMRegistryMap,
- bb: ByteBuffer,
-): void;
-export declare function decodeNPMRegistryMap(
- buffer: ByteBuffer,
-): NPMRegistryMap;
-export declare function encodeBunInstall(
- message: BunInstall,
- bb: ByteBuffer,
-): void;
+export declare function encodeNPMRegistryMap(message: NPMRegistryMap, bb: ByteBuffer): void;
+export declare function decodeNPMRegistryMap(buffer: ByteBuffer): NPMRegistryMap;
+export declare function encodeBunInstall(message: BunInstall, bb: ByteBuffer): void;
export declare function decodeBunInstall(buffer: ByteBuffer): BunInstall;
diff --git a/src/api/demo/schema.js b/src/api/demo/schema.js
index 2c31d9512..7bdd13b65 100644
--- a/src/api/demo/schema.js
+++ b/src/api/demo/schema.js
@@ -118,12 +118,7 @@ function encodeStackFrame(message, bb) {
var value = message["scope"];
if (value != null) {
var encoded = StackFrameScope[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "StackFrameScope"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "StackFrameScope"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "scope"');
@@ -500,10 +495,7 @@ function encodeFallbackMessageContainer(message, bb) {
if (value != null) {
bb.writeByte(3);
var encoded = FallbackStep[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "FallbackStep"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "FallbackStep"');
bb.writeByte(encoded);
}
@@ -612,10 +604,7 @@ function encodeJSX(message, bb) {
var value = message["runtime"];
if (value != null) {
var encoded = JSXRuntime[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "JSXRuntime"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "JSXRuntime"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "runtime"');
@@ -775,12 +764,10 @@ function decodeJavascriptBundle(bb) {
var length = bb.readVarUint();
var values = (result["modules"] = Array(length));
- for (var i = 0; i < length; i++)
- values[i] = decodeJavascriptBundledModule(bb);
+ for (var i = 0; i < length; i++) values[i] = decodeJavascriptBundledModule(bb);
var length = bb.readVarUint();
var values = (result["packages"] = Array(length));
- for (var i = 0; i < length; i++)
- values[i] = decodeJavascriptBundledPackage(bb);
+ for (var i = 0; i < length; i++) values[i] = decodeJavascriptBundledPackage(bb);
result["etag"] = bb.readByteArray();
result["generated_at"] = bb.readUint32();
result["app_package_json_dependencies_hash"] = bb.readByteArray();
@@ -834,9 +821,7 @@ function encodeJavascriptBundle(message, bb) {
if (value != null) {
bb.writeByteArray(value);
} else {
- throw new Error(
- 'Missing required field "app_package_json_dependencies_hash"',
- );
+ throw new Error('Missing required field "app_package_json_dependencies_hash"');
}
var value = message["import_from_name"];
@@ -958,12 +943,7 @@ function encodeModuleImportRecord(message, bb) {
var value = message["kind"];
if (value != null) {
var encoded = ModuleImportType[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "ModuleImportType"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "ModuleImportType"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "kind"');
@@ -1090,10 +1070,7 @@ function encodeLoaderMap(message, bb) {
for (var i = 0; i < n; i++) {
value = values[i];
var encoded = Loader[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"');
bb.writeByte(encoded);
}
} else {
@@ -1167,10 +1144,7 @@ function encodeLoadedEnvConfig(message, bb) {
var value = message["dotenv"];
if (value != null) {
var encoded = DotEnvBehavior[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "DotEnvBehavior"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "DotEnvBehavior"');
bb.writeVarUint(encoded);
} else {
throw new Error('Missing required field "dotenv"');
@@ -1272,12 +1246,7 @@ function encodeFrameworkConfig(message, bb) {
if (value != null) {
bb.writeByte(6);
var encoded = CSSInJSBehavior[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "CSSInJSBehavior"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "CSSInJSBehavior"');
bb.writeByte(encoded);
}
@@ -1309,11 +1278,7 @@ function encodeFrameworkEntryPoint(message, bb) {
if (value != null) {
var encoded = FrameworkEntryPointType[value];
if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "FrameworkEntryPointType"',
- );
+ throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "FrameworkEntryPointType"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "kind"');
@@ -1462,12 +1427,7 @@ function encodeLoadedFramework(message, bb) {
var value = message["client_css_in_js"];
if (value != null) {
var encoded = CSSInJSBehavior[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "CSSInJSBehavior"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "CSSInJSBehavior"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "client_css_in_js"');
@@ -1747,10 +1707,7 @@ function encodeTransformOptions(message, bb) {
if (value != null) {
bb.writeByte(3);
var encoded = ResolveMode[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "ResolveMode"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "ResolveMode"');
bb.writeByte(encoded);
}
@@ -1848,10 +1805,7 @@ function encodeTransformOptions(message, bb) {
if (value != null) {
bb.writeByte(15);
var encoded = Platform[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Platform"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Platform"');
bb.writeByte(encoded);
}
@@ -1925,10 +1879,7 @@ function encodeTransformOptions(message, bb) {
if (value != null) {
bb.writeByte(26);
var encoded = MessageLevel[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"');
bb.writeVarUint(encoded);
}
bb.writeByte(0);
@@ -2023,10 +1974,7 @@ function encodeTransform(message, bb) {
if (value != null) {
bb.writeByte(4);
var encoded = Loader[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"');
bb.writeByte(encoded);
}
@@ -2081,10 +2029,7 @@ function encodeScan(message, bb) {
if (value != null) {
bb.writeByte(3);
var encoded = Loader[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"');
bb.writeByte(encoded);
}
bb.writeByte(0);
@@ -2149,10 +2094,7 @@ function encodeScannedImport(message, bb) {
var value = message["kind"];
if (value != null) {
var encoded = ImportKind[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "ImportKind"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "ImportKind"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "kind"');
@@ -2249,11 +2191,7 @@ function encodeTransformResponse(message, bb) {
if (value != null) {
var encoded = TransformResponseStatus[value];
if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "TransformResponseStatus"',
- );
+ throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "TransformResponseStatus"');
bb.writeVarUint(encoded);
} else {
throw new Error('Missing required field "status"');
@@ -2464,10 +2402,7 @@ function encodeMessage(message, bb) {
var value = message["level"];
if (value != null) {
var encoded = MessageLevel[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "MessageLevel"');
bb.writeVarUint(encoded);
} else {
throw new Error('Missing required field "level"');
@@ -2629,11 +2564,7 @@ function encodeWebsocketMessage(message, bb) {
if (value != null) {
var encoded = WebsocketMessageKind[value];
if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "WebsocketMessageKind"',
- );
+ throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "WebsocketMessageKind"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "kind"');
@@ -2660,10 +2591,7 @@ function encodeWebsocketMessageWelcome(message, bb) {
var value = message["javascriptReloader"];
if (value != null) {
var encoded = Reloader[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Reloader"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Reloader"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "javascriptReloader"');
@@ -2696,10 +2624,7 @@ function encodeWebsocketMessageFileChangeNotification(message, bb) {
var value = message["loader"];
if (value != null) {
var encoded = Loader[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "loader"');
@@ -2719,11 +2644,7 @@ function encodeWebsocketCommand(message, bb) {
if (value != null) {
var encoded = WebsocketCommandKind[value];
if (encoded === void 0)
- throw new Error(
- "Invalid value " +
- JSON.stringify(value) +
- ' for enum "WebsocketCommandKind"',
- );
+ throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "WebsocketCommandKind"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "kind"');
@@ -2798,10 +2719,7 @@ function encodeWebsocketMessageBuildSuccess(message, bb) {
var value = message["loader"];
if (value != null) {
var encoded = Loader[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "loader"');
@@ -2851,10 +2769,7 @@ function encodeWebsocketMessageBuildFailure(message, bb) {
var value = message["loader"];
if (value != null) {
var encoded = Loader[value];
- if (encoded === void 0)
- throw new Error(
- "Invalid value " + JSON.stringify(value) + ' for enum "Loader"',
- );
+ if (encoded === void 0) throw new Error("Invalid value " + JSON.stringify(value) + ' for enum "Loader"');
bb.writeByte(encoded);
} else {
throw new Error('Missing required field "loader"');
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig
index 0ecd684bd..bb2f251a2 100644
--- a/src/bun.js/api/server.zig
+++ b/src/bun.js/api/server.zig
@@ -1877,7 +1877,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
resp.body.value = .{ .Used = {} };
}
}
-
+
streamLog("onResolve({any})", .{wrote_anything});
//aborted so call finalizeForAbort
diff --git a/src/bun.js/node-dns.exports.js b/src/bun.js/node-dns.exports.js
index 025728eb6..f7516923a 100644
--- a/src/bun.js/node-dns.exports.js
+++ b/src/bun.js/node-dns.exports.js
@@ -169,9 +169,9 @@ function lookupService(address, port, callback) {
}
var InternalResolver = class Resolver {
- constructor(options) { }
+ constructor(options) {}
- cancel() { }
+ cancel() {}
getServers() {
return [];
@@ -192,11 +192,7 @@ var InternalResolver = class Resolver {
switch (rrtype?.toLowerCase()) {
case "a":
case "aaaa":
- callback(
- null,
- hostname,
- results.map(mapResolveX),
- );
+ callback(null, hostname, results.map(mapResolveX));
break;
default:
callback(null, results);
@@ -221,10 +217,7 @@ var InternalResolver = class Resolver {
dns.lookup(hostname, { family: 4 }).then(
addresses => {
- callback(
- null,
- options?.ttl ? addresses : addresses.map(mapResolveX),
- );
+ callback(null, options?.ttl ? addresses : addresses.map(mapResolveX));
},
error => {
callback(error);
@@ -244,10 +237,7 @@ var InternalResolver = class Resolver {
dns.lookup(hostname, { family: 6 }).then(
addresses => {
- callback(
- null,
- options?.ttl ? addresses : addresses.map(({ address }) => address),
- );
+ callback(null, options?.ttl ? addresses : addresses.map(({ address }) => address));
},
error => {
callback(error);
@@ -397,7 +387,7 @@ var InternalResolver = class Resolver {
callback(null, []);
}
- setServers(servers) { }
+ setServers(servers) {}
};
function resolve(hostname, rrtype, callback) {
@@ -454,8 +444,8 @@ export var {
resolveTxt,
} = InternalResolver.prototype;
-function setDefaultResultOrder() { }
-function setServers() { }
+function setDefaultResultOrder() {}
+function setServers() {}
const promisifyLookup = res => {
res.sort((a, b) => a.family - b.family);
@@ -467,8 +457,7 @@ const mapResolveX = a => a.address;
const promisifyResolveX = res => {
return res?.map(mapResolveX);
-}
-
+};
// promisified versions
export const promises = {
@@ -497,14 +486,14 @@ export const promises = {
if (options?.ttl) {
return dns.lookup(hostname, { family: 4 });
}
- return dns.lookup(hostname, { family: 4 }).then(promisifyResolveX)
+ return dns.lookup(hostname, { family: 4 }).then(promisifyResolveX);
},
resolve6(hostname, options) {
if (options?.ttl) {
return dns.lookup(hostname, { family: 6 });
}
- return dns.lookup(hostname, { family: 6 }).then(promisifyResolveX)
+ return dns.lookup(hostname, { family: 6 }).then(promisifyResolveX);
},
resolveSrv(hostname) {
@@ -537,9 +526,9 @@ export const promises = {
},
Resolver: class Resolver {
- constructor(options) { }
+ constructor(options) {}
- cancel() { }
+ cancel() {}
getServers() {
return [];
@@ -562,14 +551,14 @@ export const promises = {
if (options?.ttl) {
return dns.lookup(hostname, { family: 4 });
}
- return dns.lookup(hostname, { family: 4 }).then(promisifyResolveX)
+ return dns.lookup(hostname, { family: 4 }).then(promisifyResolveX);
}
resolve6(hostname, options) {
if (options?.ttl) {
return dns.lookup(hostname, { family: 6 });
}
- return dns.lookup(hostname, { family: 6 }).then(promisifyResolveX)
+ return dns.lookup(hostname, { family: 6 }).then(promisifyResolveX);
}
resolveAny(hostname) {
@@ -616,7 +605,7 @@ export const promises = {
return Promise.resolve([]);
}
- setServers(servers) { }
+ setServers(servers) {}
},
};
for (const key of ["resolveAny", "reverse"]) {
diff --git a/src/bun.js/node-tls.exports.js b/src/bun.js/node-tls.exports.js
index 74a64cca4..46301ae77 100644
--- a/src/bun.js/node-tls.exports.js
+++ b/src/bun.js/node-tls.exports.js
@@ -154,4 +154,5 @@ var exports = {
};
export default exports;
+
export { createSecureContext, parseCertString, TLSSocket, SecureContext };
diff --git a/src/bun.js/wasi-runner.js b/src/bun.js/wasi-runner.js
index 24ff0a678..6a89510b1 100644
--- a/src/bun.js/wasi-runner.js
+++ b/src/bun.js/wasi-runner.js
@@ -3,21 +3,14 @@
const filePath = process.argv.at(1);
if (!filePath) {
- var err = new Error(
- "To run a wasm file with Bun, the first argument must be a path to a .wasm file",
- );
+ var err = new Error("To run a wasm file with Bun, the first argument must be a path to a .wasm file");
err.name = "WasmFileNotFound";
throw err;
}
// The module specifier is the resolved path to the wasm file
-var {
- WASM_CWD = process.cwd(),
- WASM_ROOT_DIR = "/",
- WASM_ENV_STR = undefined,
- WASM_USE_ASYNC_INIT = "",
-} = process.env;
+var { WASM_CWD = process.cwd(), WASM_ROOT_DIR = "/", WASM_ENV_STR = undefined, WASM_USE_ASYNC_INIT = "" } = process.env;
var env = process.env;
if (WASM_ENV_STR?.length) {
diff --git a/src/darwin_c.zig b/src/darwin_c.zig
index d62e665b9..313ecc368 100644
--- a/src/darwin_c.zig
+++ b/src/darwin_c.zig
@@ -559,13 +559,11 @@ pub const CPU_STATE_MAX = 4;
pub const processor_cpu_load_info = extern struct {
cpu_ticks: [CPU_STATE_MAX]c_uint,
};
-pub const PROCESSOR_CPU_LOAD_INFO_COUNT = @as(std.c.mach_msg_type_number_t,
- @sizeOf(processor_cpu_load_info)/@sizeOf(std.c.natural_t));
+pub const PROCESSOR_CPU_LOAD_INFO_COUNT = @as(std.c.mach_msg_type_number_t, @sizeOf(processor_cpu_load_info) / @sizeOf(std.c.natural_t));
pub const processor_info_array_t = [*]c_int;
pub const PROCESSOR_INFO_MAX = 1024;
-pub extern fn host_processor_info(host: std.c.host_t , flavor: processor_flavor_t , out_processor_count: *std.c.natural_t , out_processor_info: *processor_info_array_t, out_processor_infoCnt: *std.c.mach_msg_type_number_t) std.c.E;
-
+pub extern fn host_processor_info(host: std.c.host_t, flavor: processor_flavor_t, out_processor_count: *std.c.natural_t, out_processor_info: *processor_info_array_t, out_processor_infoCnt: *std.c.mach_msg_type_number_t) std.c.E;
pub extern fn getuid(...) std.os.uid_t;
pub extern fn getgid(...) std.os.gid_t;
@@ -754,30 +752,32 @@ pub extern fn removefileat(fd: c_int, path: [*c]const u8, state: ?*removefile_st
// As of Zig v0.11.0-dev.1393+38eebf3c4, ifaddrs.h is not included in the headers
pub const ifaddrs = extern struct {
- ifa_next: ?*ifaddrs,
- ifa_name: [*:0]u8,
- ifa_flags: c_uint,
- ifa_addr: ?*std.os.sockaddr,
- ifa_netmask: ?*std.os.sockaddr,
- ifa_dstaddr: ?*std.os.sockaddr,
- ifa_data: *anyopaque,
+ ifa_next: ?*ifaddrs,
+ ifa_name: [*:0]u8,
+ ifa_flags: c_uint,
+ ifa_addr: ?*std.os.sockaddr,
+ ifa_netmask: ?*std.os.sockaddr,
+ ifa_dstaddr: ?*std.os.sockaddr,
+ ifa_data: *anyopaque,
};
pub extern fn getifaddrs(*?*ifaddrs) c_int;
pub extern fn freeifaddrs(?*ifaddrs) void;
-const net_if_h = @cImport({ @cInclude("net/if.h"); });
+const net_if_h = @cImport({
+ @cInclude("net/if.h");
+});
pub const IFF_RUNNING = net_if_h.IFF_RUNNING;
pub const IFF_UP = net_if_h.IFF_UP;
pub const IFF_LOOPBACK = net_if_h.IFF_LOOPBACK;
pub const sockaddr_dl = extern struct {
- sdl_len: u8, // Total length of sockaddr */
- sdl_family: u8, // AF_LINK */
- sdl_index: u16, // if != 0, system given index for interface */
- sdl_type: u8, // interface type */
- sdl_nlen: u8, // interface name length, no trailing 0 reqd. */
- sdl_alen: u8, // link level address length */
- sdl_slen: u8, // link layer selector length */
- sdl_data: [12]u8, // minimum work area, can be larger; contains both if name and ll address */
+ sdl_len: u8, // Total length of sockaddr */
+ sdl_family: u8, // AF_LINK */
+ sdl_index: u16, // if != 0, system given index for interface */
+ sdl_type: u8, // interface type */
+ sdl_nlen: u8, // interface name length, no trailing 0 reqd. */
+ sdl_alen: u8, // link level address length */
+ sdl_slen: u8, // link layer selector length */
+ sdl_data: [12]u8, // minimum work area, can be larger; contains both if name and ll address */
//#ifndef __APPLE__
// /* For TokenRing */
// u_short sdl_rcf; /* source routing control */
diff --git a/src/deps/uws.zig b/src/deps/uws.zig
index 58a5b1b93..5ebbfcc51 100644
--- a/src/deps/uws.zig
+++ b/src/deps/uws.zig
@@ -319,9 +319,7 @@ pub fn NewSocketHandler(comptime ssl: bool) type {
}
pub fn from(socket: *Socket) ThisSocket {
- return ThisSocket {
- .socket = socket
- };
+ return ThisSocket{ .socket = socket };
}
pub fn adopt(
diff --git a/src/fallback.ts b/src/fallback.ts
index 964ed4e92..1893fde36 100644
--- a/src/fallback.ts
+++ b/src/fallback.ts
@@ -1,15 +1,10 @@
declare var document: any;
import { ByteBuffer } from "peechy";
import { FallbackStep } from "./api/schema";
-import {
- decodeFallbackMessageContainer,
- FallbackMessageContainer,
-} from "./api/schema";
+import { decodeFallbackMessageContainer, FallbackMessageContainer } from "./api/schema";
function getFallbackInfo(): FallbackMessageContainer {
- const binary_string = globalThis.atob(
- document.getElementById("__bunfallback").textContent.trim(),
- );
+ const binary_string = globalThis.atob(document.getElementById("__bunfallback").textContent.trim());
var len = binary_string.length;
var bytes = new Uint8Array(len);
diff --git a/src/http_client_async.zig b/src/http_client_async.zig
index 0f6045bbb..945406448 100644
--- a/src/http_client_async.zig
+++ b/src/http_client_async.zig
@@ -1029,13 +1029,13 @@ aborted: ?*std.atomic.Atomic(bool) = null,
async_http_id: u32 = 0,
pub fn init(allocator: std.mem.Allocator, method: Method, url: URL, header_entries: Headers.Entries, header_buf: string, signal: ?*std.atomic.Atomic(bool)) HTTPClient {
- return HTTPClient {
- .allocator = allocator,
- .method = method,
- .url = url,
- .header_entries = header_entries,
- .header_buf = header_buf,
- .aborted = signal,
+ return HTTPClient{
+ .allocator = allocator,
+ .method = method,
+ .url = url,
+ .header_entries = header_entries,
+ .header_buf = header_buf,
+ .aborted = signal,
};
}
diff --git a/src/linux_c.zig b/src/linux_c.zig
index ae9300477..129161579 100644
--- a/src/linux_c.zig
+++ b/src/linux_c.zig
@@ -481,10 +481,9 @@ pub fn posix_spawn_file_actions_addchdir_np(actions: *posix_spawn_file_actions_t
pub extern fn vmsplice(fd: c_int, iovec: [*]const std.os.iovec, iovec_count: usize, flags: u32) isize;
-
const net_c = @cImport({
@cInclude("ifaddrs.h"); // getifaddrs, freeifaddrs
- @cInclude("net/if.h"); // IFF_RUNNING, IFF_UP
+ @cInclude("net/if.h"); // IFF_RUNNING, IFF_UP
});
pub const ifaddrs = net_c.ifaddrs;
pub const getifaddrs = net_c.getifaddrs;
diff --git a/src/node-fallbacks/@vercel_fetch.js b/src/node-fallbacks/@vercel_fetch.js
index f75604b2b..a8de45222 100644
--- a/src/node-fallbacks/@vercel_fetch.js
+++ b/src/node-fallbacks/@vercel_fetch.js
@@ -1,15 +1,11 @@
// This is just a no-op. Intent is to prevent importing a bunch of stuff that isn't relevant.
-module.exports = (
- wrapper = "Bun" in globalThis ? Bun.fetch : globalThis.fetch,
-) => {
+module.exports = (wrapper = "Bun" in globalThis ? Bun.fetch : globalThis.fetch) => {
async function vercelFetch(url, opts = {}) {
// Convert Object bodies to JSON if they are JS objects
if (
opts.body &&
typeof opts.body === "object" &&
- (!("buffer" in opts.body) ||
- typeof opts.body.buffer !== "object" ||
- !(opts.body.buffer instanceof ArrayBuffer))
+ (!("buffer" in opts.body) || typeof opts.body.buffer !== "object" || !(opts.body.buffer instanceof ArrayBuffer))
) {
opts.body = JSON.stringify(opts.body);
// Content length will automatically be set
diff --git a/src/node-fallbacks/crypto.js b/src/node-fallbacks/crypto.js
index 4a0e4c735..8c83b6c87 100644
--- a/src/node-fallbacks/crypto.js
+++ b/src/node-fallbacks/crypto.js
@@ -3,7 +3,7 @@ export * from "crypto-browserify";
export var DEFAULT_ENCODING = "buffer";
// we deliberately reference crypto. directly here because we want to preserve the This binding
-export const getRandomValues = (array) => {
+export const getRandomValues = array => {
return crypto.getRandomValues(array);
};
@@ -16,10 +16,7 @@ export const timingSafeEqual =
? (a, b) => {
const { byteLength: byteLengthA } = a;
const { byteLength: byteLengthB } = b;
- if (
- typeof byteLengthA !== "number" ||
- typeof byteLengthB !== "number"
- ) {
+ if (typeof byteLengthA !== "number" || typeof byteLengthB !== "number") {
throw new TypeError("Input must be an array buffer view");
}
@@ -37,9 +34,7 @@ export const scryptSync =
"scryptSync" in crypto
? (password, salt, keylen, options) => {
const res = crypto.scryptSync(password, salt, keylen, options);
- return DEFAULT_ENCODING !== "buffer"
- ? new Buffer(res).toString(DEFAULT_ENCODING)
- : new Buffer(res);
+ return DEFAULT_ENCODING !== "buffer" ? new Buffer(res).toString(DEFAULT_ENCODING) : new Buffer(res);
}
: undefined;
@@ -62,9 +57,7 @@ export const scrypt =
process.nextTick(
callback,
null,
- DEFAULT_ENCODING !== "buffer"
- ? new Buffer(result).toString(DEFAULT_ENCODING)
- : new Buffer(result),
+ DEFAULT_ENCODING !== "buffer" ? new Buffer(result).toString(DEFAULT_ENCODING) : new Buffer(result),
);
} catch (err) {
throw err;
diff --git a/src/node-fallbacks/events.js b/src/node-fallbacks/events.js
index 738bf1f15..70f47eb53 100644
--- a/src/node-fallbacks/events.js
+++ b/src/node-fallbacks/events.js
@@ -34,9 +34,7 @@ if (R && typeof R.ownKeys === "function") {
ReflectOwnKeys = R.ownKeys;
} else if (Object.getOwnPropertySymbols) {
ReflectOwnKeys = function ReflectOwnKeys(target) {
- return Object.getOwnPropertyNames(target).concat(
- Object.getOwnPropertySymbols(target),
- );
+ return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
};
} else {
ReflectOwnKeys = function ReflectOwnKeys(target) {
@@ -71,10 +69,7 @@ var defaultMaxListeners = 10;
function checkListener(listener) {
if (typeof listener !== "function") {
- throw new TypeError(
- 'The "listener" argument must be of type Function. Received type ' +
- typeof listener,
- );
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
}
}
@@ -86,9 +81,7 @@ Object.defineProperty(EventEmitter, "defaultMaxListeners", {
set: function (arg) {
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
throw new RangeError(
- 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
- arg +
- ".",
+ 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".",
);
}
defaultMaxListeners = arg;
@@ -96,10 +89,7 @@ Object.defineProperty(EventEmitter, "defaultMaxListeners", {
});
EventEmitter.init = function () {
- if (
- this._events === undefined ||
- this._events === Object.getPrototypeOf(this)._events
- ) {
+ if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) {
this._events = Object.create(null);
this._eventsCount = 0;
}
@@ -111,11 +101,7 @@ EventEmitter.init = function () {
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
- throw new RangeError(
- 'The value of "n" is out of range. It must be a non-negative number. Received ' +
- n +
- ".",
- );
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
}
this._maxListeners = n;
return this;
@@ -149,9 +135,7 @@ EventEmitter.prototype.emit = function emit(type) {
throw er; // Unhandled 'error' event
}
// At least give some kind of context to the user
- var err = new Error(
- "Unhandled error." + (er ? " (" + er.message + ")" : ""),
- );
+ var err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
err.context = er;
throw err; // Unhandled 'error' event
}
@@ -186,11 +170,7 @@ function _addListener(target, type, listener, prepend) {
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (events.newListener !== undefined) {
- target.emit(
- "newListener",
- type,
- listener.listener ? listener.listener : listener,
- );
+ target.emit("newListener", type, listener.listener ? listener.listener : listener);
// Re-assign `events` because a newListener handler could have caused the
// this._events to be assigned to a new object
@@ -206,9 +186,7 @@ function _addListener(target, type, listener, prepend) {
} else {
if (typeof existing === "function") {
// Adding the second element, need to change to array.
- existing = events[type] = prepend
- ? [listener, existing]
- : [existing, listener];
+ existing = events[type] = prepend ? [listener, existing] : [existing, listener];
// If we've already got an array, just append.
} else if (prepend) {
existing.unshift(listener);
@@ -248,10 +226,7 @@ EventEmitter.prototype.addListener = function addListener(type, listener) {
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
-EventEmitter.prototype.prependListener = function prependListener(
- type,
- listener,
-) {
+EventEmitter.prototype.prependListener = function prependListener(type, listener) {
return _addListener(this, type, listener, true);
};
@@ -284,20 +259,14 @@ EventEmitter.prototype.once = function once(type, listener) {
return this;
};
-EventEmitter.prototype.prependOnceListener = function prependOnceListener(
- type,
- listener,
-) {
+EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
checkListener(listener);
this.prependListener(type, _onceWrap(this, type, listener));
return this;
};
// Emits a 'removeListener' event if and only if the listener was removed.
-EventEmitter.prototype.removeListener = function removeListener(
- type,
- listener,
-) {
+EventEmitter.prototype.removeListener = function removeListener(type, listener) {
var list, events, position, i, originalListener;
checkListener(listener);
@@ -312,8 +281,7 @@ EventEmitter.prototype.removeListener = function removeListener(
if (--this._eventsCount === 0) this._events = Object.create(null);
else {
delete events[type];
- if (events.removeListener)
- this.emit("removeListener", type, list.listener || listener);
+ if (events.removeListener) this.emit("removeListener", type, list.listener || listener);
}
} else if (typeof list !== "function") {
position = -1;
@@ -335,8 +303,7 @@ EventEmitter.prototype.removeListener = function removeListener(
if (list.length === 1) events[type] = list[0];
- if (events.removeListener !== undefined)
- this.emit("removeListener", type, originalListener || listener);
+ if (events.removeListener !== undefined) this.emit("removeListener", type, originalListener || listener);
}
return this;
@@ -399,12 +366,9 @@ function _listeners(target, type, unwrap) {
var evlistener = events[type];
if (evlistener === undefined) return [];
- if (typeof evlistener === "function")
- return unwrap ? [evlistener.listener || evlistener] : [evlistener];
+ if (typeof evlistener === "function") return unwrap ? [evlistener.listener || evlistener] : [evlistener];
- return unwrap
- ? unwrapListeners(evlistener)
- : arrayClone(evlistener, evlistener.length);
+ return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
}
EventEmitter.prototype.listeners = function listeners(type) {
@@ -509,10 +473,7 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
listener(arg);
});
} else {
- throw new TypeError(
- 'The "emitter" argument must be of type EventEmitter. Received type ' +
- typeof emitter,
- );
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
}
}
diff --git a/src/node-fallbacks/url.js b/src/node-fallbacks/url.js
index 10f1b889a..81c78001d 100644
--- a/src/node-fallbacks/url.js
+++ b/src/node-fallbacks/url.js
@@ -203,10 +203,7 @@ Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {
}
}
- if (
- !hostlessProtocol[proto] &&
- (slashes || (proto && !slashedProtocol[proto]))
- ) {
+ if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) {
// there's a hostname.
// the first instance of /, ?, ;, or # ends the host.
//
@@ -270,9 +267,7 @@ Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {
// if hostname begins with [ and ends with ]
// assume that it's an IPv6 address.
- var ipv6Hostname =
- this.hostname[0] === "[" &&
- this.hostname[this.hostname.length - 1] === "]";
+ var ipv6Hostname = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
// validate a little.
if (!ipv6Hostname) {
@@ -423,21 +418,13 @@ Url.prototype.format = function () {
if (this.host) {
host = auth + this.host;
} else if (this.hostname) {
- host =
- auth +
- (this.hostname.indexOf(":") === -1
- ? this.hostname
- : "[" + this.hostname + "]");
+ host = auth + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]");
if (this.port) {
host += ":" + this.port;
}
}
- if (
- this.query &&
- util_isObject(this.query) &&
- Object.keys(this.query).length
- ) {
+ if (this.query && util_isObject(this.query) && Object.keys(this.query).length) {
query = querystring.stringify(this.query);
}
@@ -447,10 +434,7 @@ Url.prototype.format = function () {
// only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
// unless they had them to begin with.
- if (
- this.slashes ||
- ((!protocol || slashedProtocol[protocol]) && host !== false)
- ) {
+ if (this.slashes || ((!protocol || slashedProtocol[protocol]) && host !== false)) {
host = "//" + (host || "");
if (pathname && pathname.charAt(0) !== "/") pathname = "/" + pathname;
} else if (!host) {
@@ -515,11 +499,7 @@ Url.prototype.resolveObject = function (relative) {
}
//urlParse appends trailing / to urls like http://www.example.com
- if (
- slashedProtocol[result.protocol] &&
- result.hostname &&
- !result.pathname
- ) {
+ if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {
result.path = result.pathname = "/";
}
@@ -576,9 +556,7 @@ Url.prototype.resolveObject = function (relative) {
}
var isSourceAbs = result.pathname && result.pathname.charAt(0) === "/",
- isRelAbs =
- relative.host ||
- (relative.pathname && relative.pathname.charAt(0) === "/"),
+ isRelAbs = relative.host || (relative.pathname && relative.pathname.charAt(0) === "/"),
mustEndAbs = isRelAbs || isSourceAbs || (result.host && relative.pathname),
removeAllDots = mustEndAbs,
srcPath = (result.pathname && result.pathname.split("/")) || [],
@@ -612,12 +590,8 @@ Url.prototype.resolveObject = function (relative) {
if (isRelAbs) {
// it's absolute.
- result.host =
- relative.host || relative.host === "" ? relative.host : result.host;
- result.hostname =
- relative.hostname || relative.hostname === ""
- ? relative.hostname
- : result.hostname;
+ result.host = relative.host || relative.host === "" ? relative.host : result.host;
+ result.hostname = relative.hostname || relative.hostname === "" ? relative.hostname : result.hostname;
result.search = relative.search;
result.query = relative.query;
srcPath = relPath;
@@ -639,10 +613,7 @@ Url.prototype.resolveObject = function (relative) {
//occationaly the auth can get stuck only in host
//this especially happens in cases like
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
- var authInHost =
- result.host && result.host.indexOf("@") > 0
- ? result.host.split("@")
- : false;
+ var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
if (authInHost) {
result.auth = authInHost.shift();
result.host = result.hostname = authInHost.shift();
@@ -652,9 +623,7 @@ Url.prototype.resolveObject = function (relative) {
result.query = relative.query;
//to support http.request
if (!util_isNull(result.pathname) || !util_isNull(result.search)) {
- result.path =
- (result.pathname ? result.pathname : "") +
- (result.search ? result.search : "");
+ result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : "");
}
result.href = result.format();
return result;
@@ -679,9 +648,7 @@ Url.prototype.resolveObject = function (relative) {
// then it must NOT get a trailing slash.
var last = srcPath.slice(-1)[0];
var hasTrailingSlash =
- ((result.host || relative.host || srcPath.length > 1) &&
- (last === "." || last === "..")) ||
- last === "";
+ ((result.host || relative.host || srcPath.length > 1) && (last === "." || last === "..")) || last === "";
// strip single dots, resolve double dots to parent dir
// if the path tries to go above the root, `up` ends up > 0
@@ -706,11 +673,7 @@ Url.prototype.resolveObject = function (relative) {
}
}
- if (
- mustEndAbs &&
- srcPath[0] !== "" &&
- (!srcPath[0] || srcPath[0].charAt(0) !== "/")
- ) {
+ if (mustEndAbs && srcPath[0] !== "" && (!srcPath[0] || srcPath[0].charAt(0) !== "/")) {
srcPath.unshift("");
}
@@ -718,23 +681,15 @@ Url.prototype.resolveObject = function (relative) {
srcPath.push("");
}
- var isAbsolute =
- srcPath[0] === "" || (srcPath[0] && srcPath[0].charAt(0) === "/");
+ var isAbsolute = srcPath[0] === "" || (srcPath[0] && srcPath[0].charAt(0) === "/");
// put the host back
if (psychotic) {
- result.hostname = result.host = isAbsolute
- ? ""
- : srcPath.length
- ? srcPath.shift()
- : "";
+ result.hostname = result.host = isAbsolute ? "" : srcPath.length ? srcPath.shift() : "";
//occationaly the auth can get stuck only in host
//this especially happens in cases like
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
- var authInHost =
- result.host && result.host.indexOf("@") > 0
- ? result.host.split("@")
- : false;
+ var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
if (authInHost) {
result.auth = authInHost.shift();
result.host = result.hostname = authInHost.shift();
@@ -756,9 +711,7 @@ Url.prototype.resolveObject = function (relative) {
//to support request.http
if (!util_isNull(result.pathname) || !util_isNull(result.search)) {
- result.path =
- (result.pathname ? result.pathname : "") +
- (result.search ? result.search : "");
+ result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : "");
}
result.auth = relative.auth || result.auth;
result.slashes = result.slashes || relative.slashes;
diff --git a/src/runtime.footer.bun.js b/src/runtime.footer.bun.js
index 0c83ebc49..56da601b4 100644
--- a/src/runtime.footer.bun.js
+++ b/src/runtime.footer.bun.js
@@ -14,8 +14,7 @@ export var __merge = BUN_RUNTIME.__merge;
export var __decorateClass = BUN_RUNTIME.__decorateClass;
export var __decorateParam = BUN_RUNTIME.__decorateParam;
export var $$bun_runtime_json_parse = JSON.parse;
-export var __internalIsCommonJSNamespace =
- BUN_RUNTIME.__internalIsCommonJSNamespace;
+export var __internalIsCommonJSNamespace = BUN_RUNTIME.__internalIsCommonJSNamespace;
export var __require = (globalThis.require ||= function (moduleId) {
if (typeof moduleId === "string") {
@@ -25,5 +24,4 @@ export var __require = (globalThis.require ||= function (moduleId) {
return BUN_RUNTIME.__require(moduleId);
});
__require.d ||= BUN_RUNTIME.__require.d;
-globalThis.__internalIsCommonJSNamespace ||=
- BUN_RUNTIME.__internalIsCommonJSNamespace;
+globalThis.__internalIsCommonJSNamespace ||= BUN_RUNTIME.__internalIsCommonJSNamespace;
diff --git a/src/runtime.footer.js b/src/runtime.footer.js
index 062961b1f..ceeab055d 100644
--- a/src/runtime.footer.js
+++ b/src/runtime.footer.js
@@ -1,8 +1,7 @@
// ---
// Public exports from runtime
// Compatible with bun's Runtime Environment and web browsers.
-export var $$m =
- "$primordials" in globalThis ? $primordials.require : BUN_RUNTIME.$$m;
+export var $$m = "$primordials" in globalThis ? $primordials.require : BUN_RUNTIME.$$m;
export var __HMRModule = BUN_RUNTIME.__HMRModule;
export var __FastRefreshModule = BUN_RUNTIME.__FastRefreshModule;
export var __HMRClient = BUN_RUNTIME.__HMRClient;
@@ -22,8 +21,7 @@ export var __merge = BUN_RUNTIME.__merge;
export var __decorateClass = BUN_RUNTIME.__decorateClass;
export var __decorateParam = BUN_RUNTIME.__decorateParam;
export var $$bun_runtime_json_parse = JSON.parse;
-export var __internalIsCommonJSNamespace =
- BUN_RUNTIME.__internalIsCommonJSNamespace;
+export var __internalIsCommonJSNamespace = BUN_RUNTIME.__internalIsCommonJSNamespace;
globalThis.__internalIsCommonJSNamespace ||= __internalIsCommonJSNamespace;
globalThis.require ||= BUN_RUNTIME.__require;
diff --git a/src/runtime.footer.node.js b/src/runtime.footer.node.js
index b32dc78fa..ef28d3b31 100644
--- a/src/runtime.footer.node.js
+++ b/src/runtime.footer.node.js
@@ -15,8 +15,7 @@ export var __exportDefault = BUN_RUNTIME.__exportDefault;
export var __decorateClass = BUN_RUNTIME.__decorateClass;
export var __decorateParam = BUN_RUNTIME.__decorateParam;
export var $$bun_runtime_json_parse = JSON.parse;
-export var __internalIsCommonJSNamespace =
- BUN_RUNTIME.__internalIsCommonJSNamespace;
+export var __internalIsCommonJSNamespace = BUN_RUNTIME.__internalIsCommonJSNamespace;
var require = __$module.createRequire(import.meta.url);
var process =
globalThis.process ||
diff --git a/src/runtime.footer.with-refresh.js b/src/runtime.footer.with-refresh.js
index a5b5a3b79..784f5f8fa 100644
--- a/src/runtime.footer.with-refresh.js
+++ b/src/runtime.footer.with-refresh.js
@@ -1,8 +1,7 @@
// ---
// Public exports from runtime
// Compatible with bun's Runtime Environment and web browsers.
-export var $$m =
- "$primordials" in globalThis ? $primordials.require : BUN_RUNTIME.$$m;
+export var $$m = "$primordials" in globalThis ? $primordials.require : BUN_RUNTIME.$$m;
export var __HMRModule = BUN_RUNTIME.__HMRModule;
export var __FastRefreshModule = BUN_RUNTIME.__FastRefreshModule;
export var __HMRClient = BUN_RUNTIME.__HMRClient;
@@ -22,8 +21,7 @@ export var __decorateClass = BUN_RUNTIME.__decorateClass;
export var __decorateParam = BUN_RUNTIME.__decorateParam;
export var $$bun_runtime_json_parse = JSON.parse;
export var __FastRefreshRuntime = BUN_RUNTIME.__FastRefreshRuntime;
-export var __internalIsCommonJSNamespace =
- BUN_RUNTIME.__internalIsCommonJSNamespace;
+export var __internalIsCommonJSNamespace = BUN_RUNTIME.__internalIsCommonJSNamespace;
globalThis.__internalIsCommonJSNamespace ||= __internalIsCommonJSNamespace;
globalThis.require ||= BUN_RUNTIME.__require;
diff --git a/src/runtime.js b/src/runtime.js
index b39eaed9d..537ea9eed 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -21,8 +21,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
// return __objectFreezePolyfill.has(obj);
// };
-export var __markAsModule = (target) =>
- __defProp(target, "__esModule", { value: true, configurable: true });
+export var __markAsModule = target => __defProp(target, "__esModule", { value: true, configurable: true });
// lazy require to prevent loading one icon from a design system
export var $$lzy = (target, module, props) => {
@@ -37,7 +36,7 @@ export var $$lzy = (target, module, props) => {
return target;
};
-export var __toModule = (module) => {
+export var __toModule = module => {
return __reExport(
__markAsModule(
__defProp(
@@ -81,15 +80,9 @@ export var __commonJS = (cb, name) => {
return origExports.apply(this, arguments);
};
Object.setPrototypeOf(mod_exports, __getProtoOf(origExports));
- Object.defineProperties(
- mod_exports,
- Object.getOwnPropertyDescriptors(origExports),
- );
+ Object.defineProperties(mod_exports, Object.getOwnPropertyDescriptors(origExports));
} else {
- mod_exports = __create(
- __getProtoOf(mod_exports),
- Object.getOwnPropertyDescriptors(mod_exports),
- );
+ mod_exports = __create(__getProtoOf(mod_exports), Object.getOwnPropertyDescriptors(mod_exports));
}
}
@@ -134,14 +127,13 @@ export var __commonJS = (cb, name) => {
export var __cJS2eSM = __commonJS;
-export var __internalIsCommonJSNamespace = (namespace) =>
+export var __internalIsCommonJSNamespace = namespace =>
namespace != null &&
typeof namespace === "object" &&
- ((namespace.default && namespace.default[cjsRequireSymbol]) ||
- namespace[cjsRequireSymbol]);
+ ((namespace.default && namespace.default[cjsRequireSymbol]) || namespace[cjsRequireSymbol]);
// require()
-export var __require = (namespace) => {
+export var __require = namespace => {
if (__internalIsCommonJSNamespace(namespace)) {
return namespace.default();
}
@@ -152,7 +144,7 @@ export var __require = (namespace) => {
// require().default
// this currently does nothing
// get rid of this wrapper once we're more confident we do not need special handling for default
-__require.d = (namespace) => {
+__require.d = namespace => {
return namespace;
};
@@ -176,7 +168,7 @@ export var __export = (target, all) => {
get: all[name],
enumerable: true,
configurable: true,
- set: (newValue) => (all[name] = () => newValue),
+ set: newValue => (all[name] = () => newValue),
});
};
@@ -184,7 +176,7 @@ export var __exportValue = (target, all) => {
for (var name in all) {
__defProp(target, name, {
get: () => all[name],
- set: (newValue) => (all[name] = newValue),
+ set: newValue => (all[name] = newValue),
enumerable: true,
configurable: true,
});
@@ -194,7 +186,7 @@ export var __exportValue = (target, all) => {
export var __exportDefault = (target, value) => {
__defProp(target, "default", {
get: () => value,
- set: (newValue) => (value = newValue),
+ set: newValue => (value = newValue),
enumerable: true,
configurable: true,
});
@@ -207,8 +199,7 @@ export var __reExport = (target, module, desc) => {
__defProp(target, key, {
get: () => module[key],
configurable: true,
- enumerable:
- !(desc = __getOwnPropDesc(module, key)) || desc.enumerable,
+ enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable,
});
return target;
};
@@ -237,15 +228,11 @@ export var __merge = (props, defaultProps) => {
};
export var __decorateClass = (decorators, target, key, kind) => {
- var result =
- kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
for (var i = decorators.length - 1, decorator; i >= 0; i--)
- if ((decorator = decorators[i]))
- result =
- (kind ? decorator(target, key, result) : decorator(result)) || result;
+ if ((decorator = decorators[i])) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp(target, key, result);
return result;
};
-export var __decorateParam = (index, decorator) => (target, key) =>
- decorator(target, key, index);
+export var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
diff --git a/src/runtime/errors.ts b/src/runtime/errors.ts
index 5affd14f1..e2973db91 100644
--- a/src/runtime/errors.ts
+++ b/src/runtime/errors.ts
@@ -76,8 +76,4 @@ var __ImportKind;
__ImportKind = ImportKind;
}
-export {
- __ResolveError as ResolveError,
- __BuildError as BuildError,
- __ImportKind as ImportKind,
-};
+export { __ResolveError as ResolveError, __BuildError as BuildError, __ImportKind as ImportKind };
diff --git a/src/runtime/hmr.ts b/src/runtime/hmr.ts
index 96122feba..5aff4389d 100644
--- a/src/runtime/hmr.ts
+++ b/src/runtime/hmr.ts
@@ -79,8 +79,7 @@ if (typeof window !== "undefined") {
// if they set a CSP header, that could cause this to fail
try {
let linkTag = document.querySelector("link[rel='icon']");
- BunError.previousFavicon =
- (linkTag && linkTag.getAttribute("href")) || "/favicon.ico";
+ BunError.previousFavicon = (linkTag && linkTag.getAttribute("href")) || "/favicon.ico";
if (!linkTag) {
linkTag = document.createElement("link");
linkTag.setAttribute("rel", "icon");
@@ -119,19 +118,15 @@ if (typeof window !== "undefined") {
if (!BunError.module) {
if (BunError.prom) return;
- BunError.prom = import("/bun:error.js").then((mod) => {
+ BunError.prom = import("/bun:error.js").then(mod => {
BunError.module = mod;
- !BunError.cancel &&
- BunError.render(BunError.lastError[0], BunError.lastError[1]);
+ !BunError.cancel && BunError.render(BunError.lastError[0], BunError.lastError[1]);
});
return;
}
const { renderBuildFailure, renderRuntimeError } = BunError.module;
- if (
- typeof BunError.lastError[0] === "string" ||
- BunError.lastError[0] instanceof Error
- ) {
+ if (typeof BunError.lastError[0] === "string" || BunError.lastError[0] instanceof Error) {
renderRuntimeError(BunError.lastError[0], BunError.lastError[1]);
} else {
renderBuildFailure(BunError.lastError[0], BunError.lastError[1]);
@@ -192,26 +187,17 @@ if (typeof window !== "undefined") {
const endIDRegion = rule.conditionText.indexOf(")", startIndex);
if (endIDRegion === -1) return null;
- const int = parseInt(
- rule.conditionText.substring(startIndex, endIDRegion),
- 10,
- );
+ const int = parseInt(rule.conditionText.substring(startIndex, endIDRegion), 10);
if (int !== id) {
return null;
}
- let startFileRegion = rule.conditionText.indexOf(
- '(hmr-file:"',
- endIDRegion,
- );
+ let startFileRegion = rule.conditionText.indexOf('(hmr-file:"', endIDRegion);
if (startFileRegion === -1) return null;
startFileRegion += '(hmr-file:"'.length + 1;
- const endFileRegion = rule.conditionText.indexOf(
- '"',
- startFileRegion,
- );
+ const endFileRegion = rule.conditionText.indexOf('"', startFileRegion);
if (endFileRegion === -1) return null;
// Empty file strings are invalid
if (endFileRegion - startFileRegion <= 0) return null;
@@ -219,10 +205,7 @@ if (typeof window !== "undefined") {
CSSLoader.cssLoadId.id = int;
CSSLoader.cssLoadId.node = sheet.ownerNode as HTMLStylableElement;
CSSLoader.cssLoadId.sheet = sheet;
- CSSLoader.cssLoadId.file = rule.conditionText.substring(
- startFileRegion - 1,
- endFileRegion,
- );
+ CSSLoader.cssLoadId.file = rule.conditionText.substring(startFileRegion - 1, endFileRegion);
return CSSLoader.cssLoadId;
}
@@ -265,33 +248,20 @@ if (typeof window !== "undefined") {
}
const bundleIdRule = cssRules[0] as CSSSupportsRule;
- if (
- bundleIdRule.type !== 12 ||
- !bundleIdRule.conditionText.startsWith("(hmr-bid:")
- ) {
+ if (bundleIdRule.type !== 12 || !bundleIdRule.conditionText.startsWith("(hmr-bid:")) {
continue;
}
- const bundleIdEnd = bundleIdRule.conditionText.indexOf(
- ")",
- "(hmr-bid:".length + 1,
- );
+ const bundleIdEnd = bundleIdRule.conditionText.indexOf(")", "(hmr-bid:".length + 1);
if (bundleIdEnd === -1) continue;
CSSLoader.cssLoadId.bundle_id = parseInt(
- bundleIdRule.conditionText.substring(
- "(hmr-bid:".length,
- bundleIdEnd,
- ),
+ bundleIdRule.conditionText.substring("(hmr-bid:".length, bundleIdEnd),
10,
);
for (let j = 1; j < ruleCount && match === null; j++) {
- match = this.findMatchingSupportsRule(
- cssRules[j] as CSSSupportsRule,
- id,
- sheet,
- );
+ match = this.findMatchingSupportsRule(cssRules[j] as CSSSupportsRule, id, sheet);
}
}
}
@@ -318,17 +288,11 @@ if (typeof window !== "undefined") {
}
const bundleIdRule = cssRules[0] as CSSSupportsRule;
- if (
- bundleIdRule.type !== 12 ||
- !bundleIdRule.conditionText.startsWith("(hmr-bid:")
- ) {
+ if (bundleIdRule.type !== 12 || !bundleIdRule.conditionText.startsWith("(hmr-bid:")) {
continue;
}
- const bundleIdEnd = bundleIdRule.conditionText.indexOf(
- ")",
- "(hmr-bid:".length + 1,
- );
+ const bundleIdEnd = bundleIdRule.conditionText.indexOf(")", "(hmr-bid:".length + 1);
if (bundleIdEnd === -1) continue;
CSSLoader.cssLoadId.bundle_id = parseInt(
@@ -337,11 +301,7 @@ if (typeof window !== "undefined") {
);
for (let j = 1; j < ruleCount && match === null; j++) {
- match = this.findMatchingSupportsRule(
- cssRules[j] as CSSSupportsRule,
- id,
- sheet,
- );
+ match = this.findMatchingSupportsRule(cssRules[j] as CSSSupportsRule, id, sheet);
}
}
@@ -356,11 +316,7 @@ if (typeof window !== "undefined") {
return match;
}
- handleBuildSuccess(
- bytes: Uint8Array,
- build: API.WebsocketMessageBuildSuccess,
- timestamp: number,
- ) {
+ handleBuildSuccess(bytes: Uint8Array, build: API.WebsocketMessageBuildSuccess, timestamp: number) {
const start = performance.now();
var update = this.findCSSLinkTag(build.id);
// The last 4 bytes of the build message are the hash of the module
@@ -386,12 +342,7 @@ if (typeof window !== "undefined") {
function onLoadHandler() {
const localDuration = formatDuration(performance.now() - start);
const fsDuration = _timestamp - from_timestamp;
- __hmrlog.log(
- "Reloaded in",
- `${localDuration + fsDuration}ms`,
- "-",
- filepath,
- );
+ __hmrlog.log("Reloaded in", `${localDuration + fsDuration}ms`, "-", filepath);
update = null;
filepath = null;
@@ -421,10 +372,7 @@ if (typeof window !== "undefined") {
// This is an adoptedStyleSheet, call replaceSync and be done with it.
if (!update.node || update.node.tagName === "HTML") {
update.sheet.replaceSync(this.decoder.decode(bytes));
- } else if (
- update.node.tagName === "LINK" ||
- update.node.tagName === "STYLE"
- ) {
+ } else if (update.node.tagName === "LINK" || update.node.tagName === "STYLE") {
// This might cause CSS specifity issues....
// I'm not 100% sure this is a safe operation
const sheet = new CSSStyleSheet();
@@ -433,10 +381,7 @@ if (typeof window !== "undefined") {
sheet.replaceSync(decoded);
update.node.remove();
- document.adoptedStyleSheets = [
- ...document.adoptedStyleSheets,
- sheet,
- ];
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
}
break;
}
@@ -445,9 +390,7 @@ if (typeof window !== "undefined") {
bytes = null;
}
- filePath(
- file_change_notification: API.WebsocketMessageFileChangeNotification,
- ): string | null {
+ filePath(file_change_notification: API.WebsocketMessageFileChangeNotification): string | null {
if (file_change_notification.loader !== API.Loader.css) return null;
const tag = this.findCSSLinkTag(file_change_notification.id);
@@ -481,9 +424,7 @@ if (typeof window !== "undefined") {
start() {
if (runOnce) {
- __hmrlog.warn(
- "Attempted to start HMR client multiple times. This may be a bug.",
- );
+ __hmrlog.warn("Attempted to start HMR client multiple times. This may be a bug.");
return;
}
@@ -508,23 +449,18 @@ if (typeof window !== "undefined") {
debouncedReconnect = () => {
if (
this.socket &&
- (this.socket.readyState == this.socket.OPEN ||
- this.socket.readyState == this.socket.CONNECTING)
+ (this.socket.readyState == this.socket.OPEN || this.socket.readyState == this.socket.CONNECTING)
)
return;
- this.nextReconnectAttempt = setTimeout(
- this.attemptReconnect,
- this.reconnectDelay,
- );
+ this.nextReconnectAttempt = setTimeout(this.attemptReconnect, this.reconnectDelay);
};
attemptReconnect = () => {
globalThis.clearTimeout(this.nextReconnectAttempt);
if (
this.socket &&
- (this.socket.readyState == this.socket.OPEN ||
- this.socket.readyState == this.socket.CONNECTING)
+ (this.socket.readyState == this.socket.OPEN || this.socket.readyState == this.socket.CONNECTING)
)
return;
this.connect();
@@ -534,8 +470,7 @@ if (typeof window !== "undefined") {
connect() {
if (
this.socket &&
- (this.socket.readyState == this.socket.OPEN ||
- this.socket.readyState == this.socket.CONNECTING)
+ (this.socket.readyState == this.socket.OPEN || this.socket.readyState == this.socket.CONNECTING)
)
return;
@@ -583,10 +518,7 @@ if (typeof window !== "undefined") {
case CSSImportState.Pending: {
this.cssState = CSSImportState.Loading;
// This means we can import without risk of FOUC
- if (
- document.documentElement.innerText === "" &&
- !HMRClient.cssAutoFOUC
- ) {
+ if (document.documentElement.innerText === "" && !HMRClient.cssAutoFOUC) {
if (document.body) document.body.style.visibility = "hidden";
HMRClient.cssAutoFOUC = true;
}
@@ -670,11 +602,8 @@ if (typeof window !== "undefined") {
resolve();
};
- link.onerror = (evt) => {
- console.error(
- `[CSS Importer] Error loading CSS file: ${urlString}\n`,
- evt.toString(),
- );
+ link.onerror = evt => {
+ console.error(`[CSS Importer] Error loading CSS file: ${urlString}\n`, evt.toString());
reject();
};
document.head.appendChild(link);
@@ -683,21 +612,14 @@ if (typeof window !== "undefined") {
}
static onError(event: ErrorEvent) {
if ("error" in event && !!event.error) {
- BunError.render(
- event.error,
- HMRClient.client ? HMRClient.client.cwd : "",
- );
+ BunError.render(event.error, HMRClient.client ? HMRClient.client.cwd : "");
}
}
static activate(verboseOrFastRefresh: boolean = false) {
// Support browser-like envirnments where location and WebSocket exist
// Maybe it'll work in Deno! Who knows.
- if (
- this.client ||
- !("location" in globalThis) ||
- !("WebSocket" in globalThis)
- ) {
+ if (this.client || !("location" in globalThis) || !("WebSocket" in globalThis)) {
return;
}
@@ -757,9 +679,7 @@ if (typeof window !== "undefined") {
reportBuildFailure(failure: API.WebsocketMessageBuildFailure) {
BunError.render(failure, this.cwd);
- console.group(
- `Build failed: ${failure.module_path} (${failure.log.errors} errors)`,
- );
+ console.group(`Build failed: ${failure.module_path} (${failure.log.errors} errors)`);
this.needsConsoleClear = true;
for (let msg of failure.log.msgs) {
var logFunction;
@@ -830,13 +750,8 @@ if (typeof window !== "undefined") {
return;
}
var bytes =
- buffer.data.byteOffset + buffer.index + build.blob_length <=
- buffer.data.buffer.byteLength
- ? new Uint8Array(
- buffer.data.buffer,
- buffer.data.byteOffset + buffer.index,
- build.blob_length,
- )
+ buffer.data.byteOffset + buffer.index + build.blob_length <= buffer.data.buffer.byteLength
+ ? new Uint8Array(buffer.data.buffer, buffer.data.byteOffset + buffer.index, build.blob_length)
: (empty ||= new Uint8Array(0));
if (build.loader === API.Loader.css) {
@@ -876,22 +791,13 @@ if (typeof window !== "undefined") {
}
if (end > 4 && buffer.data.length >= end + 4) {
- new Uint8Array(this.hashBuffer.buffer).set(
- buffer.data.subarray(end, end + 4),
- );
+ new Uint8Array(this.hashBuffer.buffer).set(buffer.data.subarray(end, end + 4));
hash = this.hashBuffer[0];
}
// These are the bytes!!
- var reload = new HotReload(
- build.id,
- index,
- build,
- bytes,
- ReloadBehavior.hotReload,
- hash || 0,
- );
+ var reload = new HotReload(build.id, index, build, bytes, ReloadBehavior.hotReload, hash || 0);
bytes = null;
reload.timings.notify = timestamp - build.from_timestamp;
@@ -910,17 +816,10 @@ if (typeof window !== "undefined") {
this.needsConsoleClear = false;
}
- __hmrlog.log(
- `[${formatDuration(timings.total)}ms] Reloaded`,
- filepath,
- );
+ __hmrlog.log(`[${formatDuration(timings.total)}ms] Reloaded`, filepath);
},
- (err) => {
- if (
- typeof err === "object" &&
- err &&
- err instanceof ThrottleModuleUpdateError
- ) {
+ err => {
+ if (typeof err === "object" && err && err instanceof ThrottleModuleUpdateError) {
return;
}
__hmrlog.error("Hot Module Reload failed!", err);
@@ -940,13 +839,8 @@ if (typeof window !== "undefined") {
}
}
- handleFileChangeNotification(
- buffer: ByteBuffer,
- timestamp: number,
- copy_file_path: boolean,
- ) {
- const notification =
- API.decodeWebsocketMessageFileChangeNotification(buffer);
+ handleFileChangeNotification(buffer: ByteBuffer, timestamp: number, copy_file_path: boolean) {
+ const notification = API.decodeWebsocketMessageFileChangeNotification(buffer);
let file_path = "";
switch (notification.loader) {
case API.Loader.css: {
@@ -974,12 +868,7 @@ if (typeof window !== "undefined") {
}
}
- return this.handleFileChangeNotificationBase(
- timestamp,
- notification,
- file_path,
- copy_file_path,
- );
+ return this.handleFileChangeNotificationBase(timestamp, notification, file_path, copy_file_path);
}
private handleFileChangeNotificationBase(
@@ -1052,9 +941,7 @@ if (typeof window !== "undefined") {
this.buildCommandBufWithFilePath = new Uint8Array(4096 + 256);
}
- const writeBuffer = !copy_file_path
- ? this.buildCommandBuf
- : this.buildCommandBufWithFilePath;
+ const writeBuffer = !copy_file_path ? this.buildCommandBuf : this.buildCommandBufWithFilePath;
writeBuffer[0] = !copy_file_path
? API.WebsocketCommandKind.build
: API.WebsocketCommandKind.build_with_file_path;
@@ -1071,13 +958,8 @@ if (typeof window !== "undefined") {
this.buildCommandUArray[0] = file_path.length;
writeBuffer.set(this.buildCommandUArrayEight, 9);
- const out = textEncoder.encodeInto(
- file_path,
- writeBuffer.subarray(13),
- );
- this.socket.send(
- this.buildCommandBufWithFilePath.subarray(0, 13 + out.written),
- );
+ const out = textEncoder.encodeInto(file_path, writeBuffer.subarray(13));
+ this.socket.send(this.buildCommandBufWithFilePath.subarray(0, 13 + out.written));
} else {
this.socket.send(this.buildCommandBuf);
}
@@ -1118,9 +1000,7 @@ if (typeof window !== "undefined") {
const data = new Uint8Array(event.data);
const message_header_byte_buffer = new ByteBuffer(data);
const header = API.decodeWebsocketMessage(message_header_byte_buffer);
- const buffer = new ByteBuffer(
- data.subarray(message_header_byte_buffer.index),
- );
+ const buffer = new ByteBuffer(data.subarray(message_header_byte_buffer.index));
switch (header.kind) {
case API.WebsocketMessageKind.build_fail: {
@@ -1141,9 +1021,7 @@ if (typeof window !== "undefined") {
return;
}
- const index = HMRModule.dependencies.graph
- .subarray(0, HMRModule.dependencies.graph_used)
- .indexOf(id);
+ const index = HMRModule.dependencies.graph.subarray(0, HMRModule.dependencies.graph_used).indexOf(id);
var file_path: string = "";
var loader = API.Loader.js;
if (index > -1) {
@@ -1203,12 +1081,7 @@ if (typeof window !== "undefined") {
}
}
- this.handleFileChangeNotificationBase(
- timestamp,
- { id, loader },
- file_path,
- true,
- );
+ this.handleFileChangeNotificationBase(timestamp, { id, loader }, file_path, true);
break;
}
case API.WebsocketMessageKind.file_change_notification: {
@@ -1231,27 +1104,15 @@ if (typeof window !== "undefined") {
switch (this.javascriptReloader) {
case API.Reloader.fast_refresh: {
- __hmrlog.log(
- "HMR connected in",
- formatDuration(now - clientStartTime),
- "ms",
- );
+ __hmrlog.log("HMR connected in", formatDuration(now - clientStartTime), "ms");
break;
}
case API.Reloader.live: {
- __hmrlog.log(
- "Live reload connected in",
- formatDuration(now - clientStartTime),
- "ms",
- );
+ __hmrlog.log("Live reload connected in", formatDuration(now - clientStartTime), "ms");
break;
}
default: {
- __hmrlog.log(
- "Bun connected in",
- formatDuration(now - clientStartTime),
- "ms",
- );
+ __hmrlog.log("Bun connected in", formatDuration(now - clientStartTime), "ms");
break;
}
}
@@ -1339,8 +1200,7 @@ if (typeof window !== "undefined") {
const oldGraphUsed = HMRModule.dependencies.graph_used;
var oldModule =
- HMRModule.dependencies.modules.length > this.module_index &&
- HMRModule.dependencies.modules[this.module_index];
+ HMRModule.dependencies.modules.length > this.module_index && HMRModule.dependencies.modules[this.module_index];
HMRModule.dependencies = orig_deps.fork(this.module_index);
var blobURL = "";
@@ -1361,10 +1221,9 @@ if (typeof window !== "undefined") {
: "";
try {
- const blob = new Blob(
- sourceMapURL.length > 0 ? [this.bytes, sourceMapURL] : [this.bytes],
- { type: "text/javascript" },
- );
+ const blob = new Blob(sourceMapURL.length > 0 ? [this.bytes, sourceMapURL] : [this.bytes], {
+ type: "text/javascript",
+ });
blobURL = URL.createObjectURL(blob);
HMRModule.dependencies.blobToID.set(blobURL, this.module_id);
await import(blobURL);
@@ -1378,11 +1237,7 @@ if (typeof window !== "undefined") {
this.bytes = null;
if ("__BunRenderHMRError" in globalThis) {
- globalThis.__BunRenderHMRError(
- exception,
- oldModule.file_path,
- oldModule.id,
- );
+ globalThis.__BunRenderHMRError(exception, oldModule.file_path, oldModule.id);
}
oldModule = null;
@@ -1436,26 +1291,18 @@ if (typeof window !== "undefined") {
if (!isOldModuleDead) {
oldModule.boundUpdate ||= oldModule.update.bind(oldModule);
- if (thisMod.additional_updaters)
- thisMod.additional_updaters.add(oldModule.boundUpdate);
- else
- thisMod.additional_updaters = new Set([
- oldModule.boundUpdate,
- ]);
+ if (thisMod.additional_updaters) thisMod.additional_updaters.add(oldModule.boundUpdate);
+ else thisMod.additional_updaters = new Set([oldModule.boundUpdate]);
thisMod.previousVersion = oldModule;
} else {
- if (oldModule.previousVersion)
- thisMod.previousVersion = oldModule.previousVersion;
+ if (oldModule.previousVersion) thisMod.previousVersion = oldModule.previousVersion;
thisMod.additional_updaters = origUpdaters;
}
}
- const end = Math.min(
- this.module_index + 1,
- HMRModule.dependencies.graph_used,
- );
+ const end = Math.min(this.module_index + 1, HMRModule.dependencies.graph_used);
// -- For generic hot reloading --
// ES Modules delay execution until all imports are parsed
// They execute depth-first
@@ -1505,10 +1352,7 @@ if (typeof window !== "undefined") {
// By the time we get here, it's entirely possible that another update is waiting
// Instead of scheduling it, we are going to just ignore this update.
// But we still need to re-initialize modules regardless because otherwise a dependency may not reload properly
- if (
- pendingUpdateCount === currentPendingUpdateCount &&
- foundBoundary
- ) {
+ if (pendingUpdateCount === currentPendingUpdateCount && foundBoundary) {
FastRefreshLoader.RefreshRuntime.performReactRefresh();
// Remove potential memory leak
if (isOldModuleDead) oldModule.previousVersion = null;
@@ -1527,8 +1371,7 @@ if (typeof window !== "undefined") {
}
} catch (exception) {
HMRModule.dependencies = orig_deps;
- HMRModule.dependencies.modules[this.module_index].additional_updaters =
- origUpdaters;
+ HMRModule.dependencies.modules[this.module_index].additional_updaters = origUpdaters;
throw exception;
}
this.timings.callbacks = performance.now() - callbacksStart;
@@ -1544,12 +1387,8 @@ if (typeof window !== "undefined") {
}
orig_deps = null;
- this.timings.total =
- this.timings.import + this.timings.callbacks + this.timings.notify;
- return Promise.resolve([
- HMRModule.dependencies.modules[this.module_index],
- this.timings,
- ]);
+ this.timings.total = this.timings.import + this.timings.callbacks + this.timings.notify;
+ return Promise.resolve([HMRModule.dependencies.modules[this.module_index], this.timings]);
}
}
@@ -1625,9 +1464,7 @@ if (typeof window !== "undefined") {
// Grow the dependencies graph
if (HMRModule.dependencies.graph.length <= this.graph_index) {
- const new_graph = new Uint32Array(
- HMRModule.dependencies.graph.length * 4,
- );
+ const new_graph = new Uint32Array(HMRModule.dependencies.graph.length * 4);
new_graph.set(HMRModule.dependencies.graph);
HMRModule.dependencies.graph = new_graph;
@@ -1712,11 +1549,8 @@ if (typeof window !== "undefined") {
// 4,000,000,000 in base36 occupies 7 characters
// file path is probably longer
// small strings are better strings
- this.refreshRuntimeBaseID =
- (this.file_path.length > 7 ? this.id.toString(36) : this.file_path) +
- "/";
- FastRefreshLoader.RefreshRuntime =
- FastRefreshLoader.RefreshRuntime || RefreshRuntime;
+ this.refreshRuntimeBaseID = (this.file_path.length > 7 ? this.id.toString(36) : this.file_path) + "/";
+ FastRefreshLoader.RefreshRuntime = FastRefreshLoader.RefreshRuntime || RefreshRuntime;
if (!FastRefreshLoader.hasInjectedFastRefresh) {
RefreshRuntime.injectIntoGlobalHook(globalThis);
@@ -1729,10 +1563,7 @@ if (typeof window !== "undefined") {
// $RefreshReg$
$r_(Component: any, id: string) {
- FastRefreshLoader.RefreshRuntime.register(
- Component,
- this.refreshRuntimeBaseID + id,
- );
+ FastRefreshLoader.RefreshRuntime.register(Component, this.refreshRuntimeBaseID + id);
}
// $RefreshReg$(Component, Component.name || Component.displayName)
$r(Component: any) {
@@ -1767,12 +1598,7 @@ if (typeof window !== "undefined") {
// Ensure exported React components always have names
// This is for simpler debugging
- if (
- Component &&
- typeof Component === "function" &&
- !("name" in Component) &&
- Object.isExtensible(Component)
- ) {
+ if (Component && typeof Component === "function" && !("name" in Component) && Object.isExtensible(Component)) {
const named = {
get() {
return key;
@@ -1791,9 +1617,7 @@ if (typeof window !== "undefined") {
} catch (exception) {}
}
- if (
- !FastRefreshLoader.RefreshRuntime.isLikelyComponentType(Component)
- ) {
+ if (!FastRefreshLoader.RefreshRuntime.isLikelyComponentType(Component)) {
onlyExportsComponents = false;
// We can't stop here because we may have other exports which are components that need to be registered.
continue;
diff --git a/src/runtime/regenerator.ts b/src/runtime/regenerator.ts
index 0940fb9f1..a3a7ba75e 100644
--- a/src/runtime/regenerator.ts
+++ b/src/runtime/regenerator.ts
@@ -37,8 +37,7 @@ var runtime = (function (exports) {
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator =
- outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
@@ -104,18 +103,11 @@ var runtime = (function (exports) {
IteratorPrototype = NativeIteratorPrototype;
}
- var Gp =
- (GeneratorFunctionPrototype.prototype =
- Generator.prototype =
- Object.create(IteratorPrototype));
+ var Gp = (GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype));
GeneratorFunction.prototype = GeneratorFunctionPrototype;
define(Gp, "constructor", GeneratorFunctionPrototype);
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
- GeneratorFunction.displayName = define(
- GeneratorFunctionPrototype,
- toStringTagSymbol,
- "GeneratorFunction",
- );
+ GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
@@ -164,11 +156,7 @@ var runtime = (function (exports) {
} else {
var result = record.arg;
var value = result.value;
- if (
- value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")
- ) {
+ if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
return PromiseImpl.resolve(value.__await).then(
function (value) {
invoke("next", value, resolve, reject);
@@ -245,10 +233,7 @@ var runtime = (function (exports) {
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
if (PromiseImpl === void 0) PromiseImpl = Promise;
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList),
- PromiseImpl,
- );
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
return exports.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
@@ -358,9 +343,7 @@ var runtime = (function (exports) {
}
context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method",
- );
+ context.arg = new TypeError("The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
@@ -551,11 +534,7 @@ var runtime = (function (exports) {
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
- if (
- name.charAt(0) === "t" &&
- hasOwn.call(this, name) &&
- !isNaN(+name.slice(1))
- ) {
+ if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
@@ -634,11 +613,7 @@ var runtime = (function (exports) {
abrupt: function (type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
- if (
- entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc
- ) {
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
diff --git a/src/string_immutable.zig b/src/string_immutable.zig
index e5a37006a..e85fc4ef8 100644
--- a/src/string_immutable.zig
+++ b/src/string_immutable.zig
@@ -588,7 +588,7 @@ pub inline fn endsWithChar(self: string, char: u8) bool {
pub fn withoutTrailingSlash(this: string) []const u8 {
var href = this;
while (href.len > 1 and href[href.len - 1] == '/') {
- href = href[0 .. href.len - 1];
+ href.len -= 1;
}
return href;
diff --git a/src/test/fixtures/double-export-default-bug.jsx b/src/test/fixtures/double-export-default-bug.jsx
index 3db411bb0..18f5165f9 100644
--- a/src/test/fixtures/double-export-default-bug.jsx
+++ b/src/test/fixtures/double-export-default-bug.jsx
@@ -20,8 +20,7 @@ export default function Home() {
</h1>
<p className={styles.description}>
- Get started by editing{" "}
- <code className={styles.code}>pages/index.js</code>
+ Get started by editing <code className={styles.code}>pages/index.js</code>
</p>
<div className={styles.grid}>
@@ -35,10 +34,7 @@ export default function Home() {
<p>Learn about Next.js in an interactive course with quizzes!</p>
</a>
- <a
- href="https://github.com/vercel/next.js/tree/master/examples"
- className={styles.card}
- >
+ <a href="https://github.com/vercel/next.js/tree/master/examples" className={styles.card}>
<h2>Examples &rarr;</h2>
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>
@@ -48,9 +44,7 @@ export default function Home() {
className={styles.card}
>
<h2>Deploy &rarr;</h2>
- <p>
- Instantly deploy your Next.js site to a public URL with Vercel.
- </p>
+ <p>Instantly deploy your Next.js site to a public URL with Vercel.</p>
</a>
</div>
</main>
diff --git a/src/test/fixtures/simple-150x.jsx b/src/test/fixtures/simple-150x.jsx
index 64cb88b1b..3ec65431c 100644
--- a/src/test/fixtures/simple-150x.jsx
+++ b/src/test/fixtures/simple-150x.jsx
@@ -27,19 +27,10 @@ import { SPACING } from "../helpers/styles";
return (
<Link route={buildProfileURL(profile.id)}>
<a className="Profile">
- <img
- src={_.first(profile.photos)}
- srcSet={buildImgSrcSet(_.first(profile.photos), 250)}
- />
+ <img src={_.first(profile.photos)} srcSet={buildImgSrcSet(_.first(profile.photos), 250)} />
<div className="Text">
<div className="Title">
- <Text
- font="sans-serif"
- lineHeight="20px"
- weight="semiBold"
- size="18px"
- color="#000"
- >
+ <Text font="sans-serif" lineHeight="20px" weight="semiBold" size="18px" color="#000">
{profile.name}
</Text>
</div>
@@ -111,18 +102,16 @@ import { SPACING } from "../helpers/styles";
};
}
- setEmail = (evt) => this.setState({ email: evt.target.value });
+ setEmail = evt => this.setState({ email: evt.target.value });
componentDidMount() {
Router.prefetchRoute(`/sign-up/verify`);
}
- handleSubmit = (evt) => {
+ handleSubmit = evt => {
evt.preventDefault();
- Router.pushRoute(
- `/sign-up/verify?${qs.stringify({ email: this.state.email })}`,
- );
+ Router.pushRoute(`/sign-up/verify?${qs.stringify({ email: this.state.email })}`);
};
render() {
@@ -223,24 +212,15 @@ import { SPACING } from "../helpers/styles";
<article>
<main>
<div className="Copy">
- <img
- className="Logo Logo-Home"
- src="/static/animatedlogo.gif"
- />
+ <img className="Logo Logo-Home" src="/static/animatedlogo.gif" />
<div className="Copy-title">
- <Text
- font="serif"
- size="36px"
- lineHeight="44px"
- weight="bold"
- >
+ <Text font="serif" size="36px" lineHeight="44px" weight="bold">
Your own game of The Bachelor(ette)
</Text>
</div>
<div className="Copy-body">
<Text size="16px" lineHeight="24px" font="sans-serif">
- Create a page where people apply to go on a date with you.
- You pick the winners.
+ Create a page where people apply to go on a date with you. You pick the winners.
</Text>
</div>
@@ -282,9 +262,7 @@ import { SPACING } from "../helpers/styles";
{this.state.isLoadingProfiles && <div className="Spinner" />}
<div className="FeaturedProfiles">
{!_.isEmpty(this.state.profiles) &&
- this.state.profiles.map((profile) => (
- <FeaturedProfile key={profile.id} profile={profile} />
- ))}
+ this.state.profiles.map(profile => <FeaturedProfile key={profile.id} profile={profile} />)}
</div>
</div>
</footer>
@@ -438,7 +416,7 @@ import { SPACING } from "../helpers/styles";
}
}
- const HomepageWithStore = withRedux(initStore, null, (dispatch) =>
+ const HomepageWithStore = withRedux(initStore, null, dispatch =>
bindActionCreators({ updateEntities, setCurrentUser }, dispatch),
)(LoginGate(Homepage));
})();
diff --git a/src/test/fixtures/simple.jsx b/src/test/fixtures/simple.jsx
index 63873fe8d..98d01235b 100644
--- a/src/test/fixtures/simple.jsx
+++ b/src/test/fixtures/simple.jsx
@@ -25,19 +25,10 @@ const FeaturedProfile = ({ profile }) => {
return (
<Link route={buildProfileURL(profile.id)}>
<a className="Profile">
- <img
- src={_.first(profile.photos)}
- srcSet={buildImgSrcSet(_.first(profile.photos), 250)}
- />
+ <img src={_.first(profile.photos)} srcSet={buildImgSrcSet(_.first(profile.photos), 250)} />
<div className="Text">
<div className="Title">
- <Text
- font="sans-serif"
- lineHeight="20px"
- weight="semiBold"
- size="18px"
- color="#000"
- >
+ <Text font="sans-serif" lineHeight="20px" weight="semiBold" size="18px" color="#000">
{profile.name}
</Text>
</div>
@@ -109,18 +100,16 @@ class SignupForm extends React.Component {
};
}
- setEmail = (evt) => this.setState({ email: evt.target.value });
+ setEmail = evt => this.setState({ email: evt.target.value });
componentDidMount() {
Router.prefetchRoute(`/sign-up/verify`);
}
- handleSubmit = (evt) => {
+ handleSubmit = evt => {
evt.preventDefault();
- Router.pushRoute(
- `/sign-up/verify?${qs.stringify({ email: this.state.email })}`,
- );
+ Router.pushRoute(`/sign-up/verify?${qs.stringify({ email: this.state.email })}`);
};
render() {
@@ -229,8 +218,7 @@ class Homepage extends React.Component {
</div>
<div className="Copy-body">
<Text size="16px" lineHeight="24px" font="sans-serif">
- Create a page where people apply to go on a date with you. You
- pick the winners.
+ Create a page where people apply to go on a date with you. You pick the winners.
</Text>
</div>
@@ -272,9 +260,7 @@ class Homepage extends React.Component {
{this.state.isLoadingProfiles && <div className="Spinner" />}
<div className="FeaturedProfiles">
{!_.isEmpty(this.state.profiles) &&
- this.state.profiles.map((profile) => (
- <FeaturedProfile key={profile.id} profile={profile} />
- ))}
+ this.state.profiles.map(profile => <FeaturedProfile key={profile.id} profile={profile} />)}
</div>
</div>
</footer>
@@ -428,7 +414,7 @@ class Homepage extends React.Component {
}
}
-const HomepageWithStore = withRedux(initStore, null, (dispatch) =>
+const HomepageWithStore = withRedux(initStore, null, dispatch =>
bindActionCreators({ updateEntities, setCurrentUser }, dispatch),
)(LoginGate(Homepage));
diff --git a/test/bun.js/.prettierignore b/test/bun.js/.prettierignore
new file mode 100644
index 000000000..91b589eb2
--- /dev/null
+++ b/test/bun.js/.prettierignore
@@ -0,0 +1,2 @@
+node_modules
+third-party
diff --git a/test/bun.js/baz.js b/test/bun.js/baz.js
index 5837bb3bb..58a9bb4b0 100644
--- a/test/bun.js/baz.js
+++ b/test/bun.js/baz.js
@@ -1,2 +1,3 @@
// this file is used in resolve.test.js
+//
export default {};
diff --git a/test/bun.js/buffer.test.js b/test/bun.js/buffer.test.js
index 0dcf96816..b8fade4d2 100644
--- a/test/bun.js/buffer.test.js
+++ b/test/bun.js/buffer.test.js
@@ -2552,7 +2552,10 @@ it("should not perform out-of-bound access on invalid UTF-8 byte sequence", () =
});
it("repro #2063", () => {
- const buf = Buffer.from("eyJlbWFpbCI6Ijg3MTg4NDYxN0BxcS5jb20iLCJpZCI6OCwicm9sZSI6Im5vcm1hbCIsImlhdCI6MTY3NjI4NDQyMSwiZXhwIjoxNjc2ODg5MjIxfQ", 'base64');
+ const buf = Buffer.from(
+ "eyJlbWFpbCI6Ijg3MTg4NDYxN0BxcS5jb20iLCJpZCI6OCwicm9sZSI6Im5vcm1hbCIsImlhdCI6MTY3NjI4NDQyMSwiZXhwIjoxNjc2ODg5MjIxfQ",
+ "base64",
+ );
expect(buf.length).toBe(85);
expect(buf[82]).toBe(50);
expect(buf[83]).toBe(49);
diff --git a/test/bun.js/bun-server.test.ts b/test/bun.js/bun-server.test.ts
index 6e0eab6fd..52574d2a3 100644
--- a/test/bun.js/bun-server.test.ts
+++ b/test/bun.js/bun-server.test.ts
@@ -131,14 +131,16 @@ describe("Server", () => {
return new Response(
new ReadableStream({
async pull(controller) {
+ console.trace("here");
abortController.abort();
const buffer = await Bun.file(import.meta.dir + "/fixture.html.gz").arrayBuffer();
+ console.trace("here");
controller.enqueue(buffer);
+ console.trace("here");
//wait to detect the connection abortion
await Bun.sleep(15);
-
controller.close();
},
}),
@@ -155,11 +157,15 @@ describe("Server", () => {
});
try {
+ console.trace("here");
await fetch(`http://${server.hostname}:${server.port}`, { signal: abortController.signal });
} catch {}
await Bun.sleep(10);
+ console.trace("here");
expect(signalOnServer).toBe(true);
+ console.trace("here");
server.stop(true);
+ console.trace("here");
}
});
});
diff --git a/test/bun.js/bun-write.test.js b/test/bun.js/bun-write.test.js
index 68e221d51..c324d36a0 100644
--- a/test/bun.js/bun-write.test.js
+++ b/test/bun.js/bun-write.test.js
@@ -142,7 +142,7 @@ it("Bun.file", async () => {
it("Bun.file empty file", async () => {
const file = path.join(import.meta.dir, "emptyFile");
await gcTick();
- const buffer = await Bun.file(file).arrayBuffer()
+ const buffer = await Bun.file(file).arrayBuffer();
expect(buffer.byteLength).toBe(0);
await gcTick();
});
diff --git a/test/bun.js/disabled-module.test.js b/test/bun.js/disabled-module.test.js
index c12676959..61411aa44 100644
--- a/test/bun.js/disabled-module.test.js
+++ b/test/bun.js/disabled-module.test.js
@@ -1,38 +1,72 @@
import { expect, test } from "bun:test";
-test("not implemented yet module masquerades as undefined and throws an error", () => {
- const worker_threads = import.meta.require("worker_threads");
+// test("not implemented yet module masquerades as undefined and throws an error", () => {
+// const worker_threads = import.meta.require("worker_threads");
- expect(typeof worker_threads).toBe("undefined");
- expect(typeof worker_threads.getEnvironmentData).toBe("undefined");
+// expect(typeof worker_threads).toBe("undefined");
+// expect(typeof worker_threads.getEnvironmentData).toBe("undefined");
+// });
+
+test("AsyncContext", async done => {
+ const { AsyncContext } = import.meta.require("async_hooks");
+ console.log("here");
+ const ctx = new AsyncContext();
+ ctx
+ .run(1234, async () => {
+ expect(ctx.get()).toBe(1234);
+ console.log("here");
+ await 1;
+ console.log("ctx", ctx.get());
+ const setTimeoutResult = await ctx.run(
+ 2345,
+ () =>
+ new Promise(resolve => {
+ queueMicrotask(() => {
+ console.log("queueMicrotask", ctx.get());
+ resolve(ctx.get());
+ });
+ }),
+ );
+ expect(setTimeoutResult).toBe(2345);
+ expect(ctx.get()).toBe(1234);
+ return "final result";
+ })
+ .then(result => {
+ expect(result).toBe("final result");
+ // The code that generated the Promise has access to the 1234
+ // value provided to ctx.run above, but consumers of the Promise
+ // do not automatically inherit it.
+ expect(ctx.get()).toBeUndefined();
+ done();
+ });
});
-test("AsyncLocalStorage polyfill", () => {
- const { AsyncLocalStorage } = import.meta.require("async_hooks");
+// test("AsyncLocalStorage polyfill", () => {
+// const { AsyncLocalStorage } = import.meta.require("async_hooks");
- const store = new AsyncLocalStorage();
- var called = false;
- expect(store.getStore()).toBe(null);
- store.run({ foo: "bar" }, () => {
- expect(store.getStore()).toEqual({ foo: "bar" });
- called = true;
- });
- expect(store.getStore()).toBe(null);
- expect(called).toBe(true);
-});
+// const store = new AsyncLocalStorage();
+// var called = false;
+// expect(store.getStore()).toBe(null);
+// store.run({ foo: "bar" }, () => {
+// expect(store.getStore()).toEqual({ foo: "bar" });
+// called = true;
+// });
+// expect(store.getStore()).toBe(null);
+// expect(called).toBe(true);
+// });
-test("AsyncResource polyfill", () => {
- const { AsyncResource } = import.meta.require("async_hooks");
+// test("AsyncResource polyfill", () => {
+// const { AsyncResource } = import.meta.require("async_hooks");
- const resource = new AsyncResource("test");
- var called = false;
- resource.runInAsyncScope(
- () => {
- called = true;
- },
- null,
- "foo",
- "bar",
- );
- expect(called).toBe(true);
-});
+// const resource = new AsyncResource("test");
+// var called = false;
+// resource.runInAsyncScope(
+// () => {
+// called = true;
+// },
+// null,
+// "foo",
+// "bar",
+// );
+// expect(called).toBe(true);
+// });
diff --git a/test/bun.js/fetch.test.js b/test/bun.js/fetch.test.js
index e0f4c7d43..be64a0109 100644
--- a/test/bun.js/fetch.test.js
+++ b/test/bun.js/fetch.test.js
@@ -554,7 +554,7 @@ describe("Bun.file", () => {
testBlobInterface(data => {
const blob = new Blob([data]);
const buffer = Bun.peek(blob.arrayBuffer());
- const path = join(tempdir , "tmp-" + callCount++ + ".bytes");
+ const path = join(tempdir, "tmp-" + callCount++ + ".bytes");
require("fs").writeFileSync(path, buffer);
const file = Bun.file(path);
expect(blob.size).toBe(file.size);
diff --git a/test/bun.js/fetch_headers.test.js b/test/bun.js/fetch_headers.test.js
index 7f8fab188..2e5b9fa52 100644
--- a/test/bun.js/fetch_headers.test.js
+++ b/test/bun.js/fetch_headers.test.js
@@ -19,17 +19,17 @@ describe("Headers", async () => {
});
it("Headers should work", async () => {
- expect(await fetchContent({"x-test": "header 1"})).toBe("header 1");
+ expect(await fetchContent({ "x-test": "header 1" })).toBe("header 1");
});
it("Header names must be valid", async () => {
- expect(() => fetch(url, {headers: {"a\tb:c": "foo" }})).toThrow("Invalid header name: 'a\tb:c'");
- expect(() => fetch(url, {headers: {"❤️": "foo" }})).toThrow("Invalid header name: '❤️'");
+ expect(() => fetch(url, { headers: { "a\tb:c": "foo" } })).toThrow("Invalid header name: 'a\tb:c'");
+ expect(() => fetch(url, { headers: { "❤️": "foo" } })).toThrow("Invalid header name: '❤️'");
});
it("Header values must be valid", async () => {
- expect(() => fetch(url, {headers: {"x-test": "\0" }})).toThrow("Header 'x-test' has invalid value: '\0'");
- expect(() => fetch(url, {headers: {"x-test": "❤️" }})).toThrow("Header 'x-test' has invalid value: '❤️'");
+ expect(() => fetch(url, { headers: { "x-test": "\0" } })).toThrow("Header 'x-test' has invalid value: '\0'");
+ expect(() => fetch(url, { headers: { "x-test": "❤️" } })).toThrow("Header 'x-test' has invalid value: '❤️'");
});
it("repro 1602", async () => {
@@ -42,17 +42,13 @@ describe("Headers", async () => {
expect(roundTripString).toBe(origString);
// This one will pass
- expect(await fetchContent({"x-test": roundTripString})).toBe(roundTripString);
+ expect(await fetchContent({ "x-test": roundTripString })).toBe(roundTripString);
// This would hang
- expect(await fetchContent({"x-test": origString})).toBe(origString);
+ expect(await fetchContent({ "x-test": origString })).toBe(origString);
});
});
async function fetchContent(headers) {
- const res = await fetch(
- url,
- { headers: headers },
- { verbose: true }
- );
+ const res = await fetch(url, { headers: headers }, { verbose: true });
return await res.text();
}
diff --git a/test/bun.js/repro_2005.test.js b/test/bun.js/repro_2005.test.js
index bd80ab7dd..dc0cd9a97 100644
--- a/test/bun.js/repro_2005.test.js
+++ b/test/bun.js/repro_2005.test.js
@@ -8,5 +8,4 @@ it("regex literal with non-Latin1 should work", () => {
//Incorrect result: 这是一段要替换的文字
expect(text.replace(/要替换/, "")).toBe("这是一段的文字");
-
});
diff --git a/test/snippets/code-simplification-neql-define.js b/test/snippets/code-simplification-neql-define.js
index c7676dc9b..bd7ab9207 100644
--- a/test/snippets/code-simplification-neql-define.js
+++ b/test/snippets/code-simplification-neql-define.js
@@ -2,7 +2,7 @@ var testFailed = false;
const invariant = () => {
testFailed = true;
};
-var $$m = (arg) => {
+var $$m = arg => {
var module = { exports: {} },
exports = module.exports;
return arg(module, exports);
@@ -12,31 +12,19 @@ var size = 100,
export var $f332019d = $$m(
{
- "relay-runtime/lib/network/RelayQueryResponseCache.js": (
- module,
- exports,
- ) => {
+ "relay-runtime/lib/network/RelayQueryResponseCache.js": (module, exports) => {
var RelayQueryResponseCache = function () {
var foo = function RelayQueryResponseCache(_ref) {
var size = _ref.size,
ttl = _ref.ttl;
!(size > 0)
? process.env.NODE_ENV !== "production"
- ? invariant(
- false,
- "RelayQueryResponseCache: Expected the max cache size to be > 0, got " +
- "`%s`.",
- size,
- )
+ ? invariant(false, "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + "`%s`.", size)
: invariant(false)
: void 0;
!(ttl > 0)
? process.env.NODE_ENV !== "production"
- ? invariant(
- false,
- "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.",
- ttl,
- )
+ ? invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl)
: invariant(false)
: void 0;
};
diff --git a/test/snippets/export.js b/test/snippets/export.js
index 2a757269f..bf334f025 100644
--- a/test/snippets/export.js
+++ b/test/snippets/export.js
@@ -21,9 +21,6 @@ export function test() {
if (where.default !== "hi") {
throw new Error(`_auth import is incorrect.`);
}
- console.assert(
- powerLevel.description === "9001",
- "Symbol is not exported correctly",
- );
+ console.assert(powerLevel.description === "9001", "Symbol is not exported correctly");
return testDone(import.meta.url);
}
diff --git a/test/snippets/jsx-entities.jsx b/test/snippets/jsx-entities.jsx
index ac5d32225..7123fd674 100644
--- a/test/snippets/jsx-entities.jsx
+++ b/test/snippets/jsx-entities.jsx
@@ -926,10 +926,7 @@ export function test() {
key = txt.value;
}
- console.assert(
- elements[rawKey] === key.codePointAt(0),
- `${key} is not ${elements[rawKey]}`,
- );
+ console.assert(elements[rawKey] === key.codePointAt(0), `${key} is not ${elements[rawKey]}`);
}
return testDone(import.meta.url);
diff --git a/test/snippets/latin1-chars-in-regexp.js b/test/snippets/latin1-chars-in-regexp.js
index 1a533b1e1..0ba85d100 100644
--- a/test/snippets/latin1-chars-in-regexp.js
+++ b/test/snippets/latin1-chars-in-regexp.js
@@ -10,40 +10,24 @@
export var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
export var re_btou = new RegExp(
- [
- "[\xC0-\xDF][\x80-\xBF]",
- "[\xE0-\xEF][\x80-\xBF]{2}",
- "[\xF0-\xF7][\x80-\xBF]{3}",
- ].join("|"),
+ ["[\xC0-\xDF][\x80-\xBF]", "[\xE0-\xEF][\x80-\xBF]{2}", "[\xF0-\xF7][\x80-\xBF]{3}"].join("|"),
"g",
);
const encoder = new TextEncoder();
-const realLines = [
- "[\xC0-\xDF][\x80-\xBF]",
- "[\xE0-\xEF][\x80-\xBF]{2}",
- "[\xF0-\xF7][\x80-\xBF]{3}",
-];
-const real = realLines.map((input) => Array.from(encoder.encode(input)));
+const realLines = ["[\xC0-\xDF][\x80-\xBF]", "[\xE0-\xEF][\x80-\xBF]{2}", "[\xF0-\xF7][\x80-\xBF]{3}"];
+const real = realLines.map(input => Array.from(encoder.encode(input)));
const expected = [
[91, 195, 128, 45, 195, 159, 93, 91, 194, 128, 45, 194, 191, 93],
- [
- 91, 195, 160, 45, 195, 175, 93, 91, 194, 128, 45, 194, 191, 93, 123, 50,
- 125,
- ],
- [
- 91, 195, 176, 45, 195, 183, 93, 91, 194, 128, 45, 194, 191, 93, 123, 51,
- 125,
- ],
+ [91, 195, 160, 45, 195, 175, 93, 91, 194, 128, 45, 194, 191, 93, 123, 50, 125],
+ [91, 195, 176, 45, 195, 183, 93, 91, 194, 128, 45, 194, 191, 93, 123, 51, 125],
];
const newlinePreserved = `\n`;
export function test() {
- if (
- !real.every((point, i) => point.every((val, j) => val === expected[i][j]))
- ) {
+ if (!real.every((point, i) => point.every((val, j) => val === expected[i][j]))) {
throw new Error(
`test failed
${JSON.stringify({ expected, real }, null, 2)}`,
@@ -55,11 +39,7 @@ ${JSON.stringify({ expected, real }, null, 2)}`,
}
const decoder = new TextDecoder("utf8");
- if (
- !realLines.every(
- (line, i) => decoder.decode(Uint8Array.from(expected[i])) === line,
- )
- ) {
+ if (!realLines.every((line, i) => decoder.decode(Uint8Array.from(expected[i])) === line)) {
throw new Error(
`test failed. Lines did not match.
${JSON.stringify({ expected, real }, null, 2)}`,
diff --git a/test/snippets/optional-chain-with-function.js b/test/snippets/optional-chain-with-function.js
index 82ad51d46..841c8a584 100644
--- a/test/snippets/optional-chain-with-function.js
+++ b/test/snippets/optional-chain-with-function.js
@@ -3,10 +3,10 @@ export function test() {
const multipleSecondaryValues = undefined;
const ratings = ["123"];
- var bar = multipleSecondaryValues?.map((value) => false);
- bar = bar?.multipleSecondaryValues?.map((value) => false);
- bar = bar?.bar?.multipleSecondaryValues?.map((value) => false);
- bar = {}?.bar?.multipleSecondaryValues?.map((value) => false);
+ var bar = multipleSecondaryValues?.map(value => false);
+ bar = bar?.multipleSecondaryValues?.map(value => false);
+ bar = bar?.bar?.multipleSecondaryValues?.map(value => false);
+ bar = {}?.bar?.multipleSecondaryValues?.map(value => false);
} catch (e) {
throw e;
}
diff --git a/test/snippets/react-context-value-func.tsx b/test/snippets/react-context-value-func.tsx
index e7ced1292..800ad428d 100644
--- a/test/snippets/react-context-value-func.tsx
+++ b/test/snippets/react-context-value-func.tsx
@@ -12,7 +12,7 @@ const ContextProvider = ({ children }) => {
const ContextValue = ({}) => (
<Context.Consumer>
- {(foo) => {
+ {foo => {
if (foo) {
return <div>Worked!</div>;
}
diff --git a/test/snippets/simple-lit-example.ts b/test/snippets/simple-lit-example.ts
index 3c53f03ab..1b10b61db 100644
--- a/test/snippets/simple-lit-example.ts
+++ b/test/snippets/simple-lit-example.ts
@@ -3,7 +3,7 @@ import { LitElement, html, css } from "lit";
import { customElement, property, eventOptions } from "lit/decorators.js";
var loadedResolve;
-var loadedPromise = new Promise((resolve) => {
+var loadedPromise = new Promise(resolve => {
loadedResolve = resolve;
});
@@ -35,11 +35,7 @@ export class MyElement extends LitElement {
@property() planet = "Earth";
render() {
- return html`
- <span @click=${this.togglePlanet} class="planet" id="planet-id"
- >${this.planet}</span
- >
- `;
+ return html` <span @click=${this.togglePlanet} class="planet" id="planet-id">${this.planet}</span> `;
}
@eventOptions({ once: true })
diff --git a/test/snippets/spread_with_key.tsx b/test/snippets/spread_with_key.tsx
index d9f842d27..2dc0c7072 100644
--- a/test/snippets/spread_with_key.tsx
+++ b/test/snippets/spread_with_key.tsx
@@ -4,12 +4,7 @@ import React from "react";
export function SpreadWithTheKey({ className }: Props) {
const rest = {};
return (
- <div
- className={className}
- key="spread-with-the-key"
- {...rest}
- onClick={() => console.log("click")}
- >
+ <div className={className} key="spread-with-the-key" {...rest} onClick={() => console.log("click")}>
Rendered component containing warning
</div>
);
diff --git a/test/snippets/string-escapes.js b/test/snippets/string-escapes.js
index 436140939..5fbc8da6c 100644
--- a/test/snippets/string-escapes.js
+++ b/test/snippets/string-escapes.js
@@ -30,31 +30,23 @@ const encoder = new TextEncoder();
const encodedObj = encoder.encode(JSON.stringify(obj));
// ------------------------------------------------------------
const correctEncodedObj = [
- 123, 34, 92, 114, 92, 110, 34, 58, 34, 92, 114, 92, 110, 34, 44, 34, 92, 110,
- 34, 58, 34, 92, 110, 34, 44, 34, 92, 116, 34, 58, 34, 92, 116, 34, 44, 34, 92,
- 102, 34, 58, 34, 92, 102, 34, 44, 34, 92, 117, 48, 48, 48, 98, 34, 58, 34, 92,
- 117, 48, 48, 48, 98, 34, 44, 34, 226, 128, 168, 34, 58, 34, 226, 128, 168, 34,
- 44, 34, 226, 128, 169, 34, 58, 34, 226, 128, 169, 34, 44, 34, 92, 117, 48, 48,
- 48, 48, 34, 58, 34, 92, 117, 48, 48, 48, 48, 194, 160, 110, 117, 108, 108, 32,
- 98, 121, 116, 101, 34, 44, 34, 240, 159, 152, 138, 34, 58, 34, 240, 159, 152,
- 138, 34, 44, 34, 240, 159, 152, 131, 34, 58, 34, 240, 159, 152, 131, 34, 44,
- 34, 240, 159, 149, 181, 240, 159, 143, 189, 226, 128, 141, 226, 153, 130, 239,
- 184, 143, 34, 58, 34, 240, 159, 149, 181, 240, 159, 143, 189, 226, 128, 141,
- 226, 153, 130, 239, 184, 143, 34, 44, 34, 227, 139, 161, 34, 58, 34, 227, 139,
- 161, 34, 44, 34, 226, 152, 186, 34, 58, 34, 226, 152, 186, 34, 44, 34, 227,
- 130, 183, 34, 58, 34, 227, 130, 183, 34, 44, 34, 240, 159, 145, 139, 34, 58,
- 34, 240, 159, 145, 139, 34, 44, 34, 102, 34, 58, 34, 226, 130, 135, 34, 44,
- 34, 226, 152, 185, 34, 58, 34, 226, 152, 185, 34, 44, 34, 226, 152, 187, 34,
- 58, 34, 226, 152, 187, 34, 44, 34, 99, 104, 105, 108, 100, 114, 101, 110, 34,
- 58, 49, 50, 51, 125,
+ 123, 34, 92, 114, 92, 110, 34, 58, 34, 92, 114, 92, 110, 34, 44, 34, 92, 110, 34, 58, 34, 92, 110, 34, 44, 34, 92,
+ 116, 34, 58, 34, 92, 116, 34, 44, 34, 92, 102, 34, 58, 34, 92, 102, 34, 44, 34, 92, 117, 48, 48, 48, 98, 34, 58, 34,
+ 92, 117, 48, 48, 48, 98, 34, 44, 34, 226, 128, 168, 34, 58, 34, 226, 128, 168, 34, 44, 34, 226, 128, 169, 34, 58, 34,
+ 226, 128, 169, 34, 44, 34, 92, 117, 48, 48, 48, 48, 34, 58, 34, 92, 117, 48, 48, 48, 48, 194, 160, 110, 117, 108, 108,
+ 32, 98, 121, 116, 101, 34, 44, 34, 240, 159, 152, 138, 34, 58, 34, 240, 159, 152, 138, 34, 44, 34, 240, 159, 152, 131,
+ 34, 58, 34, 240, 159, 152, 131, 34, 44, 34, 240, 159, 149, 181, 240, 159, 143, 189, 226, 128, 141, 226, 153, 130, 239,
+ 184, 143, 34, 58, 34, 240, 159, 149, 181, 240, 159, 143, 189, 226, 128, 141, 226, 153, 130, 239, 184, 143, 34, 44, 34,
+ 227, 139, 161, 34, 58, 34, 227, 139, 161, 34, 44, 34, 226, 152, 186, 34, 58, 34, 226, 152, 186, 34, 44, 34, 227, 130,
+ 183, 34, 58, 34, 227, 130, 183, 34, 44, 34, 240, 159, 145, 139, 34, 58, 34, 240, 159, 145, 139, 34, 44, 34, 102, 34,
+ 58, 34, 226, 130, 135, 34, 44, 34, 226, 152, 185, 34, 58, 34, 226, 152, 185, 34, 44, 34, 226, 152, 187, 34, 58, 34,
+ 226, 152, 187, 34, 44, 34, 99, 104, 105, 108, 100, 114, 101, 110, 34, 58, 49, 50, 51, 125,
];
export const jsxVariants = (
<>
- "\r\n": "\r\n", "\n": "\n", "\t": "\t", "\f": "\f", "\v": "\v", "\u2028":
- "\u2028", "\u2029": "\u2029", "😊": "😊", "😃": "😃", "🕵🏽‍♂️": "🕵🏽‍♂️", "㋡":
- "㋡", "☺": "☺", シ: "シ", "👋": "👋", f: f, "☹": "☹", "☻": "☻", children:
- 123,
+ "\r\n": "\r\n", "\n": "\n", "\t": "\t", "\f": "\f", "\v": "\v", "\u2028": "\u2028", "\u2029": "\u2029", "😊": "😊",
+ "😃": "😃", "🕵🏽‍♂️": "🕵🏽‍♂️", "㋡": "㋡", "☺": "☺", シ: "シ", "👋": "👋", f: f, "☹": "☹", "☻": "☻", children: 123,
<div data="\r\n" />
<div data="\n" />
<div data="\t" />
diff --git a/test/snippets/styledcomponents-output.js b/test/snippets/styledcomponents-output.js
index fca6e8407..91c871770 100644
--- a/test/snippets/styledcomponents-output.js
+++ b/test/snippets/styledcomponents-output.js
@@ -3,8 +3,7 @@ import React from "react";
import ReactDOM from "react-dom";
const ErrorScreenRoot = styled.div`
- font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial,
- sans-serif;
+ font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
position: fixed;
top: 0;
left: 0;
@@ -18,8 +17,7 @@ const ErrorScreenRoot = styled.div`
text-align: center;
background-color: #0b2988;
color: #fff;
- font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial,
- sans-serif;
+ font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
line-height: 1.5em;
& > p {
@@ -35,23 +33,15 @@ export function test() {
if (typeof window !== "undefined") {
const reactEl = document.createElement("div");
document.body.appendChild(reactEl);
- ReactDOM.render(
- <ErrorScreenRoot id="error-el">
- The react child should have this text
- </ErrorScreenRoot>,
- reactEl,
- );
+ ReactDOM.render(<ErrorScreenRoot id="error-el">The react child should have this text</ErrorScreenRoot>, reactEl);
const style = document.querySelector("style[data-styled]");
console.assert(style, "style tag should exist");
console.assert(
- style.textContent.split("").every((a) => a.codePointAt(0) < 128),
+ style.textContent.split("").every(a => a.codePointAt(0) < 128),
"style tag should not contain invalid unicode codepoints",
);
- console.assert(
- document.querySelector("#error-el").textContent ===
- "The react child should have this text",
- );
+ console.assert(document.querySelector("#error-el").textContent === "The react child should have this text");
ReactDOM.unmountComponentAtNode(reactEl);
reactEl.remove();
diff --git a/test/snippets/template-literal.js b/test/snippets/template-literal.js
index a5749a555..8d8f64917 100644
--- a/test/snippets/template-literal.js
+++ b/test/snippets/template-literal.js
@@ -1,4 +1,4 @@
-const css = (templ) => templ.toString();
+const css = templ => templ.toString();
const fooNoBracesUTF8 = css`
before
@@ -25,8 +25,7 @@ const fooUTF16 = css`
`;
-const templateLiteralWhichDefinesAFunction = ((...args) =>
- args[args.length - 1]().toString())`
+const templateLiteralWhichDefinesAFunction = ((...args) => args[args.length - 1]().toString())`
before
🙃 ${() => true}
after
@@ -35,17 +34,11 @@ const templateLiteralWhichDefinesAFunction = ((...args) =>
export function test() {
for (let foo of [fooNoBracesUT16, fooNoBracesUTF8, fooUTF16, fooUTF8]) {
- console.assert(
- foo.includes("before"),
- `Expected ${foo} to include "before"`,
- );
+ console.assert(foo.includes("before"), `Expected ${foo} to include "before"`);
console.assert(foo.includes("after"), `Expected ${foo} to include "after"`);
}
- console.assert(
- templateLiteralWhichDefinesAFunction.includes("true"),
- "Expected fooFunction to include 'true'",
- );
+ console.assert(templateLiteralWhichDefinesAFunction.includes("true"), "Expected fooFunction to include 'true'");
return testDone(import.meta.url);
}
diff --git a/test/snippets/type-only-imports.ts b/test/snippets/type-only-imports.ts
index c43fcf278..38d02c743 100644
--- a/test/snippets/type-only-imports.ts
+++ b/test/snippets/type-only-imports.ts
@@ -3,8 +3,7 @@ import type Bacon from "tree";
import type { SilentSymbolCollisionsAreOkayInTypeScript } from "./app";
export const baconator: Bacon = true;
-export const SilentSymbolCollisionsAreOkayInTypeScript: SilentSymbolCollisionsAreOkayInTypeScript =
- true;
+export const SilentSymbolCollisionsAreOkayInTypeScript: SilentSymbolCollisionsAreOkayInTypeScript = true;
export function test() {
console.assert(SilentSymbolCollisionsAreOkayInTypeScript);