diff --git a/Cargo.toml b/Cargo.toml index 53633e4..ec25075 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,6 +79,10 @@ path = "examples/axum.rs" name = "multi" path = "examples/multi-thread.rs" +[[example]] +name = "vite-react" +path = "examples/vite-react/server.rs" + [[example]] name = "webpack" path = "examples/webpack-react/server.rs" diff --git a/README.md b/README.md index 1950903..e497fcb 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The project aims to enable server side rendering on rust servers in the simplest It use an embedded version of the v8 javascript engine (rusty_v8) to parse and evaluate a built bundle file and return a string with the rendered html. -Currently it works with Webpack bundler v5.65.0. +Currently it works with latest [Vite](https://vitejs.dev/), latest [Webpack](https://webpack.js.org/) and [React 17](https://react.dev/) - Check the examples folder. > Check here the benchmark results. diff --git a/examples/actix.rs b/examples/actix.rs index e83a31b..e78e026 100644 --- a/examples/actix.rs +++ b/examples/actix.rs @@ -1,29 +1,30 @@ use actix_files as fs; -use actix_web::{get, http::StatusCode, middleware::Logger, App, HttpResponse, HttpServer}; +use actix_web::{get, http::StatusCode, App, HttpResponse, HttpServer}; use std::cell::RefCell; +use std::env; use std::fs::read_to_string; -use std::time::Instant; +use std::path::Path; use ssr_rs::Ssr; +use std::time::Instant; thread_local! { static SSR: RefCell> = RefCell::new( Ssr::from( - read_to_string("./client/dist/ssr/index.js").unwrap(), - "SSR" + read_to_string(Path::new("./dist/ssr/server-build.js").to_str().unwrap()).unwrap(), + "Index" ).unwrap() ) } #[actix_web::main] async fn main() -> std::io::Result<()> { - env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); + println!("{:?}", env::current_dir()?); Ssr::create_platform(); HttpServer::new(|| { App::new() - .wrap(Logger::default()) .service(fs::Files::new("/styles", "client/dist/ssr/styles/").show_files_listing()) .service(fs::Files::new("/images", "client/dist/ssr/images/").show_files_listing()) .service(fs::Files::new("/scripts", "client/dist/client/").show_files_listing()) diff --git a/examples/vite-react/.eslintrc.cjs b/examples/vite-react/.eslintrc.cjs new file mode 100644 index 0000000..d6c9537 --- /dev/null +++ b/examples/vite-react/.eslintrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +} diff --git a/examples/vite-react/.gitignore b/examples/vite-react/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/examples/vite-react/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/examples/vite-react/README.md b/examples/vite-react/README.md new file mode 100644 index 0000000..0d6babe --- /dev/null +++ b/examples/vite-react/README.md @@ -0,0 +1,30 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js +export default { + // other rules... + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: ['./tsconfig.json', './tsconfig.node.json'], + tsconfigRootDir: __dirname, + }, +} +``` + +- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` +- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/examples/vite-react/index.html b/examples/vite-react/index.html new file mode 100644 index 0000000..e4b78ea --- /dev/null +++ b/examples/vite-react/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/examples/vite-react/package.json b/examples/vite-react/package.json new file mode 100644 index 0000000..928402f --- /dev/null +++ b/examples/vite-react/package.json @@ -0,0 +1,30 @@ +{ + "name": "vite-react", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "build:rust-ssr": "vite build --ssr src/server-entry.tsx", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "react": "^17.0.2", + "react-dom": "^17.0.2" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^15.2.3", + "@types/react": "^18.2.56", + "@types/react-dom": "^18.2.19", + "@typescript-eslint/eslint-plugin": "^7.0.2", + "@typescript-eslint/parser": "^7.0.2", + "@vitejs/plugin-react-swc": "^3.5.0", + "eslint": "^8.56.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.5", + "typescript": "^5.2.2", + "vite": "^5.1.4" + } +} diff --git a/examples/vite-react/pnpm-lock.yaml b/examples/vite-react/pnpm-lock.yaml new file mode 100644 index 0000000..73b921b --- /dev/null +++ b/examples/vite-react/pnpm-lock.yaml @@ -0,0 +1,1731 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + react: + specifier: ^17.0.2 + version: 17.0.2 + react-dom: + specifier: ^17.0.2 + version: 17.0.2(react@17.0.2) + +devDependencies: + '@rollup/plugin-node-resolve': + specifier: ^15.2.3 + version: 15.2.3 + '@types/react': + specifier: ^18.2.56 + version: 18.2.64 + '@types/react-dom': + specifier: ^18.2.19 + version: 18.2.21 + '@typescript-eslint/eslint-plugin': + specifier: ^7.0.2 + version: 7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/parser': + specifier: ^7.0.2 + version: 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@vitejs/plugin-react-swc': + specifier: ^3.5.0 + version: 3.6.0(vite@5.1.5) + eslint: + specifier: ^8.56.0 + version: 8.57.0 + eslint-plugin-react-hooks: + specifier: ^4.6.0 + version: 4.6.0(eslint@8.57.0) + eslint-plugin-react-refresh: + specifier: ^0.4.5 + version: 0.4.5(eslint@8.57.0) + typescript: + specifier: ^5.2.2 + version: 5.4.2 + vite: + specifier: ^5.1.4 + version: 5.1.5 + +packages: + + /@aashutoshrathi/word-wrap@1.2.6: + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + dev: true + + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.57.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js@8.57.0: + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 2.0.2 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/module-importer@1.0.1: + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + dev: true + + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + dev: true + + /@nodelib/fs.scandir@2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat@2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk@1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + dev: true + + /@rollup/plugin-node-resolve@15.2.3: + resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0 + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.8 + dev: true + + /@rollup/pluginutils@5.1.0: + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + + /@rollup/rollup-android-arm-eabi@4.12.1: + resolution: {integrity: sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.12.1: + resolution: {integrity: sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.12.1: + resolution: {integrity: sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.12.1: + resolution: {integrity: sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.12.1: + resolution: {integrity: sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.12.1: + resolution: {integrity: sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.12.1: + resolution: {integrity: sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.12.1: + resolution: {integrity: sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.12.1: + resolution: {integrity: sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.12.1: + resolution: {integrity: sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.12.1: + resolution: {integrity: sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.12.1: + resolution: {integrity: sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.12.1: + resolution: {integrity: sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core-darwin-arm64@1.4.5: + resolution: {integrity: sha512-toMSkbByHNfGXESyY1aiq5L3KutgijrNWB/THgdHIA1aIbwtrgMdFQfxpSE+INuuvWYi/Fxarv86EnU7ewbI0Q==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@swc/core-darwin-x64@1.4.5: + resolution: {integrity: sha512-LN8cbnmb4Gav8UcbBc+L/DEthmzCWZz22rQr6fIEHMN+f0d71fuKnV0ca0hoKbpZn33dlzUmXQE53HRjlRUQbw==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm-gnueabihf@1.4.5: + resolution: {integrity: sha512-suRFkhBWmOQxlM4frpos1uqjmHfaEI8FuJ0LL5+yRE7IunNDeQJBKujGZt6taeuxo1KqC0N0Ajr8IluN2wrKpA==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-gnu@1.4.5: + resolution: {integrity: sha512-mLKxasQArDGmR6k9c0tkPVUdoo8VfUecocMG1Mx9NYvpidJNaZ3xq9nYM77v7uq1fQqrs/59DM1fJTNRWvv/UQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-musl@1.4.5: + resolution: {integrity: sha512-pgKuyRP7S29U/HMDTx+x8dFcklWxwB9cHFNCNWSE6bS4vHR93jc4quwPX9OEQX5CVHxm+c8+xof043I4OGkAXw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-x64-gnu@1.4.5: + resolution: {integrity: sha512-srR+YN86Oerzoghd0DPCzTbTp08feeJPSr9kkNdmtQWENOa4l/9cJV3+XY6vviw0sEjezPmYnc3SwRxJRaxvEw==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-x64-musl@1.4.5: + resolution: {integrity: sha512-aSf41LZtDeG5VXI4RCnzcu0UInPyNm3ip8Kw+sCK+sSqW9o7DgBkyqqbip3RZq84fNUHBQQQQdKXetltsyRRqw==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-arm64-msvc@1.4.5: + resolution: {integrity: sha512-vU3k8JwRUlTkJMfJQY9E4VvLrsIFOpfhnvbuXB84Amo1cJsz+bYQcC6RSvY7qpaDzDKFdUGbJco4uZTRoRf7Mg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-ia32-msvc@1.4.5: + resolution: {integrity: sha512-856YRh3frRK2XbrSjDOFBgoAqWJLNRkaEtfGzXfeEoyJlOz0BFsSJHxKlHAFkxRfHe2li9DJRUQFTEhXn4OUWw==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-x64-msvc@1.4.5: + resolution: {integrity: sha512-j1+kV7jmWY1+NbXAvxAEW165781yLXVZKLcoXIZKmw18EatqMF6w8acg1gDG8C+Iw5aWLkRZVS4pijSh7+DtCQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core@1.4.5: + resolution: {integrity: sha512-4/JGkG4b1Z/QwCGgx+Ub46MlzrsZvBk5JSkxm9PcZ4bSX81c+4Y94Xm3iLp5Ka8NxzS5rD4mJSpcYuN3Tw0ceg==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.5 + optionalDependencies: + '@swc/core-darwin-arm64': 1.4.5 + '@swc/core-darwin-x64': 1.4.5 + '@swc/core-linux-arm-gnueabihf': 1.4.5 + '@swc/core-linux-arm64-gnu': 1.4.5 + '@swc/core-linux-arm64-musl': 1.4.5 + '@swc/core-linux-x64-gnu': 1.4.5 + '@swc/core-linux-x64-musl': 1.4.5 + '@swc/core-win32-arm64-msvc': 1.4.5 + '@swc/core-win32-ia32-msvc': 1.4.5 + '@swc/core-win32-x64-msvc': 1.4.5 + dev: true + + /@swc/counter@0.1.3: + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + dev: true + + /@swc/types@0.1.5: + resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} + dev: true + + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true + + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + dev: true + + /@types/prop-types@15.7.11: + resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} + dev: true + + /@types/react-dom@18.2.21: + resolution: {integrity: sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==} + dependencies: + '@types/react': 18.2.64 + dev: true + + /@types/react@18.2.64: + resolution: {integrity: sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==} + dependencies: + '@types/prop-types': 15.7.11 + '@types/scheduler': 0.16.8 + csstype: 3.1.3 + dev: true + + /@types/resolve@1.20.2: + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + dev: true + + /@types/scheduler@0.16.8: + resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} + dev: true + + /@types/semver@7.5.8: + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + dev: true + + /@typescript-eslint/eslint-plugin@7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/scope-manager': 7.1.1 + '@typescript-eslint/type-utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/visitor-keys': 7.1.1 + debug: 4.3.4 + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + semver: 7.6.0 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@7.1.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 7.1.1 + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) + '@typescript-eslint/visitor-keys': 7.1.1 + debug: 4.3.4 + eslint: 8.57.0 + typescript: 5.4.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager@7.1.1: + resolution: {integrity: sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/visitor-keys': 7.1.1 + dev: true + + /@typescript-eslint/type-utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) + '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + debug: 4.3.4 + eslint: 8.57.0 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@7.1.1: + resolution: {integrity: sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/typescript-estree@7.1.1(typescript@5.4.2): + resolution: {integrity: sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/visitor-keys': 7.1.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.0 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 7.1.1 + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) + eslint: 8.57.0 + semver: 7.6.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys@7.1.1: + resolution: {integrity: sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 7.1.1 + eslint-visitor-keys: 3.4.3 + dev: true + + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + + /@vitejs/plugin-react-swc@3.6.0(vite@5.1.5): + resolution: {integrity: sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==} + peerDependencies: + vite: ^4 || ^5 + dependencies: + '@swc/core': 1.4.5 + vite: 5.1.5 + transitivePeerDependencies: + - '@swc/helpers' + dev: true + + /acorn-jsx@5.3.2(acorn@8.11.3): + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.11.3 + dev: true + + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + dev: true + + /callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + dev: true + + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + dev: true + + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + dev: true + + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-plugin-react-hooks@4.6.0(eslint@8.57.0): + resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dependencies: + eslint: 8.57.0 + dev: true + + /eslint-plugin-react-refresh@0.4.5(eslint@8.57.0): + resolution: {integrity: sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==} + peerDependencies: + eslint: '>=7' + dependencies: + eslint: 8.57.0 + dev: true + + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/regexpp': 4.10.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.1 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.3 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 3.4.3 + dev: true + + /esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + + /esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + dependencies: + reusify: 1.0.4 + dev: true + + /file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.2.0 + dev: true + + /fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + dev: true + + /flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true + + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.1 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /hasown@2.0.1: + resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + dev: true + + /import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + dependencies: + hasown: 2.0.1 + dev: true + + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true + + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: false + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true + + /json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true + + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: true + + /levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + dev: false + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: false + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} + dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /postcss@8.4.35: + resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + dev: true + + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + dev: true + + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /react-dom@17.0.2(react@17.0.2): + resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} + peerDependencies: + react: 17.0.2 + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react: 17.0.2 + scheduler: 0.20.2 + dev: false + + /react@17.0.2: + resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + dev: false + + /resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rollup@4.12.1: + resolution: {integrity: sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.12.1 + '@rollup/rollup-android-arm64': 4.12.1 + '@rollup/rollup-darwin-arm64': 4.12.1 + '@rollup/rollup-darwin-x64': 4.12.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.12.1 + '@rollup/rollup-linux-arm64-gnu': 4.12.1 + '@rollup/rollup-linux-arm64-musl': 4.12.1 + '@rollup/rollup-linux-riscv64-gnu': 4.12.1 + '@rollup/rollup-linux-x64-gnu': 4.12.1 + '@rollup/rollup-linux-x64-musl': 4.12.1 + '@rollup/rollup-win32-arm64-msvc': 4.12.1 + '@rollup/rollup-win32-ia32-msvc': 4.12.1 + '@rollup/rollup-win32-x64-msvc': 4.12.1 + fsevents: 2.3.3 + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /scheduler@0.20.2: + resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + dev: false + + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /ts-api-utils@1.2.1(typescript@5.4.2): + resolution: {integrity: sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.4.2 + dev: true + + /type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /typescript@5.4.2: + resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.1 + dev: true + + /vite@5.1.5: + resolution: {integrity: sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.19.12 + postcss: 8.4.35 + rollup: 4.12.1 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true diff --git a/examples/vite-react/public/vite.svg b/examples/vite-react/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/examples/vite-react/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/vite-react/server.rs b/examples/vite-react/server.rs new file mode 100644 index 0000000..09320b0 --- /dev/null +++ b/examples/vite-react/server.rs @@ -0,0 +1,34 @@ +use actix_web::{get, http::StatusCode, App, HttpResponse, HttpServer}; +use std::cell::RefCell; +use std::fs::read_to_string; +use std::path::Path; + +use ssr_rs::Ssr; + +thread_local! { + static SSR: RefCell> = RefCell::new( + Ssr::from( + read_to_string(Path::new("./dist/server-entry.js").to_str().unwrap()).unwrap(), + "" + ).unwrap() + ) +} + +#[actix_web::main] +async fn main() -> std::io::Result<()> { + Ssr::create_platform(); + + HttpServer::new(|| App::new().service(index)) + .bind("127.0.0.1:8080")? + .run() + .await +} + +#[get("/")] +async fn index() -> HttpResponse { + let result = SSR.with(|ssr| ssr.borrow_mut().render_to_string(None).unwrap()); + + HttpResponse::build(StatusCode::OK) + .content_type("text/html; charset=utf-8") + .body(result) +} diff --git a/examples/vite-react/src/App.css b/examples/vite-react/src/App.css new file mode 100644 index 0000000..b9d355d --- /dev/null +++ b/examples/vite-react/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/examples/vite-react/src/App.tsx b/examples/vite-react/src/App.tsx new file mode 100644 index 0000000..afe48ac --- /dev/null +++ b/examples/vite-react/src/App.tsx @@ -0,0 +1,35 @@ +import { useState } from 'react' +import reactLogo from './assets/react.svg' +import viteLogo from '/vite.svg' +import './App.css' + +function App() { + const [count, setCount] = useState(0) + + return ( + <> +
+ + Vite logo + + + React logo + +
+

Vite + React

+
+ +

+ Edit src/App.tsx and save to test HMR +

+
+

+ Click on the Vite and React logos to learn more +

+ + ) +} + +export default App diff --git a/examples/vite-react/src/assets/react.svg b/examples/vite-react/src/assets/react.svg new file mode 100644 index 0000000..6c87de9 --- /dev/null +++ b/examples/vite-react/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/vite-react/src/index.css b/examples/vite-react/src/index.css new file mode 100644 index 0000000..6119ad9 --- /dev/null +++ b/examples/vite-react/src/index.css @@ -0,0 +1,68 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/examples/vite-react/src/main.tsx b/examples/vite-react/src/main.tsx new file mode 100644 index 0000000..3d7150d --- /dev/null +++ b/examples/vite-react/src/main.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App.tsx' +import './index.css' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/examples/vite-react/src/server-entry.tsx b/examples/vite-react/src/server-entry.tsx new file mode 100644 index 0000000..793ee80 --- /dev/null +++ b/examples/vite-react/src/server-entry.tsx @@ -0,0 +1,6 @@ +import { renderToString } from "react-dom/server"; +import App from "./App"; + +export const Index = () => { + return renderToString(); +}; diff --git a/examples/vite-react/src/vite-env.d.ts b/examples/vite-react/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/examples/vite-react/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vite-react/tsconfig.json b/examples/vite-react/tsconfig.json new file mode 100644 index 0000000..a7fc6fb --- /dev/null +++ b/examples/vite-react/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/vite-react/tsconfig.node.json b/examples/vite-react/tsconfig.node.json new file mode 100644 index 0000000..97ede7e --- /dev/null +++ b/examples/vite-react/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/vite-react/vite.config.ts b/examples/vite-react/vite.config.ts new file mode 100644 index 0000000..860ef1e --- /dev/null +++ b/examples/vite-react/vite.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react-swc"; +import { nodeResolve } from "@rollup/plugin-node-resolve"; + +// https://vitejs.dev/config/ +export default defineConfig({ + build: { + rollupOptions: { + //input: "./src/server-entry.tsx", + output: { + format: "iife", + dir: "dist/", + }, + }, + }, + ssr: { + target: "webworker", + noExternal: true, + }, + plugins: [react()], +}); diff --git a/examples/webpack-react/package.json b/examples/webpack-react/package.json index 7f15b2a..5a032d4 100644 --- a/examples/webpack-react/package.json +++ b/examples/webpack-react/package.json @@ -81,7 +81,7 @@ "parcel": "^2.0.1", "ts-jest": "^27.1.1", "typescript": "^5.3.3", - "webpack": "^5.65.0", + "webpack": "^5.90.3", "webpack-cli": "^4.9.1" }, "prettier": { diff --git a/examples/webpack-react/pnpm-lock.yaml b/examples/webpack-react/pnpm-lock.yaml index 06b456d..46255b0 100644 --- a/examples/webpack-react/pnpm-lock.yaml +++ b/examples/webpack-react/pnpm-lock.yaml @@ -19,7 +19,7 @@ dependencies: version: 17.0.2(react@17.0.2) ts-loader: specifier: ^8.1.0 - version: 8.4.0(typescript@5.3.3)(webpack@5.89.0) + version: 8.4.0(typescript@5.3.3)(webpack@5.90.3) web-vitals: specifier: ^1.0.1 version: 1.1.2 @@ -51,19 +51,19 @@ devDependencies: version: 18.2.20 clean-webpack-plugin: specifier: ^4.0.0-alpha.0 - version: 4.0.0(webpack@5.89.0) + version: 4.0.0(webpack@5.90.3) css-loader: specifier: ^5.2.2 - version: 5.2.7(webpack@5.89.0) + version: 5.2.7(webpack@5.90.3) file-loader: specifier: ^6.2.0 - version: 6.2.0(webpack@5.89.0) + version: 6.2.0(webpack@5.90.3) jest: specifier: ^27.4.5 version: 27.5.1 mini-css-extract-plugin: specifier: ^1.5.0 - version: 1.6.2(webpack@5.89.0) + version: 1.6.2(webpack@5.90.3) parcel: specifier: ^2.0.1 version: 2.10.3(postcss@8.4.32)(typescript@5.3.3) @@ -74,11 +74,11 @@ devDependencies: specifier: ^5.3.3 version: 5.3.3 webpack: - specifier: ^5.65.0 - version: 5.89.0(webpack-cli@4.10.0) + specifier: ^5.90.3 + version: 5.90.3(webpack-cli@4.10.0) webpack-cli: specifier: ^4.9.1 - version: 4.10.0(webpack@5.89.0) + version: 4.10.0(webpack@5.90.3) packages: @@ -2118,14 +2118,14 @@ packages: '@webassemblyjs/ast': 1.11.6 '@xtuc/long': 4.2.2 - /@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0)(webpack@5.89.0): + /@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0)(webpack@5.90.3): resolution: {integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==} peerDependencies: webpack: 4.x.x || 5.x.x webpack-cli: 4.x.x dependencies: - webpack: 5.89.0(webpack-cli@4.10.0) - webpack-cli: 4.10.0(webpack@5.89.0) + webpack: 5.90.3(webpack-cli@4.10.0) + webpack-cli: 4.10.0(webpack@5.90.3) /@webpack-cli/info@1.5.0(webpack-cli@4.10.0): resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==} @@ -2133,7 +2133,7 @@ packages: webpack-cli: 4.x.x dependencies: envinfo: 7.11.0 - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack@5.90.3) /@webpack-cli/serve@1.7.0(webpack-cli@4.10.0): resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==} @@ -2144,7 +2144,7 @@ packages: webpack-dev-server: optional: true dependencies: - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack@5.90.3) /@xtuc/ieee754@1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -2572,14 +2572,14 @@ packages: resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} dev: true - /clean-webpack-plugin@4.0.0(webpack@5.89.0): + /clean-webpack-plugin@4.0.0(webpack@5.90.3): resolution: {integrity: sha512-WuWE1nyTNAyW5T7oNyys2EN0cfP2fdRxhxnIQWiAp0bMabPdHhoGxM8A6YL2GhqwgrPnnaemVE7nv5XJ2Fhh2w==} engines: {node: '>=10.0.0'} peerDependencies: webpack: '>=4.0.0 <6.0.0' dependencies: del: 4.1.1 - webpack: 5.89.0(webpack-cli@4.10.0) + webpack: 5.90.3(webpack-cli@4.10.0) dev: true /cliui@7.0.4: @@ -2693,7 +2693,7 @@ packages: shebang-command: 2.0.0 which: 2.0.2 - /css-loader@5.2.7(webpack@5.89.0): + /css-loader@5.2.7(webpack@5.90.3): resolution: {integrity: sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -2709,7 +2709,7 @@ packages: postcss-value-parser: 4.2.0 schema-utils: 3.3.0 semver: 7.5.4 - webpack: 5.89.0(webpack-cli@4.10.0) + webpack: 5.90.3(webpack-cli@4.10.0) dev: true /css-select@4.3.0: @@ -3223,7 +3223,7 @@ packages: bser: 2.1.1 dev: true - /file-loader@6.2.0(webpack@5.89.0): + /file-loader@6.2.0(webpack@5.90.3): resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -3231,7 +3231,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(webpack-cli@4.10.0) + webpack: 5.90.3(webpack-cli@4.10.0) dev: true /fill-range@7.0.1: @@ -4677,7 +4677,7 @@ packages: engines: {node: '>=4'} dev: true - /mini-css-extract-plugin@1.6.2(webpack@5.89.0): + /mini-css-extract-plugin@1.6.2(webpack@5.90.3): resolution: {integrity: sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -4685,7 +4685,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(webpack-cli@4.10.0) + webpack: 5.90.3(webpack-cli@4.10.0) webpack-sources: 1.4.3 dev: true @@ -5670,7 +5670,7 @@ packages: supports-hyperlinks: 2.3.0 dev: true - /terser-webpack-plugin@5.3.10(webpack@5.89.0): + /terser-webpack-plugin@5.3.10(webpack@5.90.3): resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -5691,7 +5691,7 @@ packages: schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.26.0 - webpack: 5.89.0(webpack-cli@4.10.0) + webpack: 5.90.3(webpack-cli@4.10.0) /terser@5.26.0: resolution: {integrity: sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==} @@ -5798,7 +5798,7 @@ packages: yargs-parser: 20.2.9 dev: true - /ts-loader@8.4.0(typescript@5.3.3)(webpack@5.89.0): + /ts-loader@8.4.0(typescript@5.3.3)(webpack@5.90.3): resolution: {integrity: sha512-6nFY3IZ2//mrPc+ImY3hNWx1vCHyEhl6V+wLmL4CZcm6g1CqX7UKrkc6y0i4FwcfOhxyMPCfaEvh20f4r9GNpw==} engines: {node: '>=10.0.0'} peerDependencies: @@ -5811,7 +5811,7 @@ packages: micromatch: 4.0.5 semver: 7.5.4 typescript: 5.3.3 - webpack: 5.89.0(webpack-cli@4.10.0) + webpack: 5.90.3(webpack-cli@4.10.0) dev: false /tslib@2.6.2: @@ -5936,7 +5936,7 @@ packages: engines: {node: '>=10.4'} dev: true - /webpack-cli@4.10.0(webpack@5.89.0): + /webpack-cli@4.10.0(webpack@5.90.3): resolution: {integrity: sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==} engines: {node: '>=10.13.0'} hasBin: true @@ -5957,7 +5957,7 @@ packages: optional: true dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 1.2.0(webpack-cli@4.10.0)(webpack@5.89.0) + '@webpack-cli/configtest': 1.2.0(webpack-cli@4.10.0)(webpack@5.90.3) '@webpack-cli/info': 1.5.0(webpack-cli@4.10.0) '@webpack-cli/serve': 1.7.0(webpack-cli@4.10.0) colorette: 2.0.20 @@ -5967,7 +5967,7 @@ packages: import-local: 3.1.0 interpret: 2.2.0 rechoir: 0.7.1 - webpack: 5.89.0(webpack-cli@4.10.0) + webpack: 5.90.3(webpack-cli@4.10.0) webpack-merge: 5.10.0 /webpack-merge@5.10.0: @@ -5989,8 +5989,8 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} - /webpack@5.89.0(webpack-cli@4.10.0): - resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} + /webpack@5.90.3(webpack-cli@4.10.0): + resolution: {integrity: sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -6020,9 +6020,9 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.89.0) + terser-webpack-plugin: 5.3.10(webpack@5.90.3) watchpack: 2.4.0 - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack@5.90.3) webpack-sources: 3.2.3 transitivePeerDependencies: - '@swc/core' diff --git a/examples/webpack-react/src/ssrEntry.tsx b/examples/webpack-react/src/ssrEntry.tsx index d3664e2..5b77c11 100644 --- a/examples/webpack-react/src/ssrEntry.tsx +++ b/examples/webpack-react/src/ssrEntry.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { renderToString, renderToStaticMarkup } from 'react-dom/server'; import App from './App'; import './index.css'; diff --git a/examples/webpack-react/webpack.ssr.js b/examples/webpack-react/webpack.ssr.js index 242238d..9a2902a 100644 --- a/examples/webpack-react/webpack.ssr.js +++ b/examples/webpack-react/webpack.ssr.js @@ -2,7 +2,6 @@ import path from 'path'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import { fileURLToPath } from 'url'; -import webpack from 'webpack'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -14,16 +13,16 @@ export default { target: 'web', entry: path.resolve(__dirname, './src/ssrEntry.tsx'), output: { + path: path.resolve(__dirname, buildDirectory), publicPath: '', globalObject: 'this', - path: path.resolve(__dirname, buildDirectory), - // render_to_string entry point name!! + filename: 'index.js', + //iife: true, library: { - type: 'module', + type: 'var', + // Entry point name: 'SSR', }, - libraryTarget: 'var', - filename: 'index.js', }, resolve: { fallback: { fs: false, path: false }, diff --git a/src/lib.rs b/src/lib.rs index f3b3f5d..6154f0a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ //! //! It use an embedded version of the v8 javascript engine (rusty_v8) to parse and evaluate a built bundle file and return a string with the rendered html. //! -//! Currently it works with Webpack bundler v5.65.0 +//! Currently it works with latest [Vite](https://vitejs.dev/), latest [Webpack](https://webpack.js.org/) and [React 17](https://react.dev/) - Check the examples folder. //! //! > Check here the //! benchmarks results. diff --git a/src/ssr.rs b/src/ssr.rs index 61943f5..2aed227 100644 --- a/src/ssr.rs +++ b/src/ssr.rs @@ -42,6 +42,12 @@ where /// /// Multiple instances are allowed. /// + /// Entry point is the JS element that the bundler exposes. It has to be an empty string in + /// case the bundle is exported as IIFE. + /// + /// Check the examples vite-react (for the IIFE example) and + /// webpack-react (for the bundle exported as variable). + /// /// See the examples folder for more about using multiple parallel instances for multi-threaded /// execution. pub fn from(source: String, entry_point: &str) -> Result { @@ -68,16 +74,16 @@ where let exports = match script.run(scope) { Some(val) => val, - None => { - return Err( - "Invalid JS: Missing entry point. Is the bundle exported as a variable?", - ) - } + None => return Err("Invalid JS: Execute your script with d8 to debug"), }; let object = match exports.to_object(scope) { Some(val) => val, - None => return Err("Invalid JS: There are no objects"), + None => { + return Err( + "Invalid JS: The script does not return any object after being executed", + ) + } }; let mut fn_map: HashMap> = HashMap::new(); @@ -180,7 +186,7 @@ mod tests { assert_eq!( res.unwrap_err(), - "Invalid JS: Missing entry point. Is the bundle exported as a variable?" + "Invalid JS: Execute your script with d8 to debug" ); } @@ -192,10 +198,19 @@ mod tests { let res = Ssr::from(source.to_owned(), "SSR"); assert_eq!( res.unwrap_err(), - "Invalid JS: Missing entry point. Is the bundle exported as a variable?" + "Invalid JS: Execute your script with d8 to debug" ); } + #[test] + fn executes_iife_source() { + init_test(); + let source = r##"(() => ({x: () => 'rendered HTML'}))()"##; + + let mut js = Ssr::from(source.to_owned(), "").unwrap(); + assert_eq!(js.render_to_string(None).unwrap(), "rendered HTML"); + } + #[test] fn pass_param_to_function() { init_test(); diff --git a/tests/assets/react-17-iife.js b/tests/assets/react-17-iife.js new file mode 100644 index 0000000..96c08c9 --- /dev/null +++ b/tests/assets/react-17-iife.js @@ -0,0 +1,1710 @@ +(function (exports) { + "use strict"; + var jsxRuntime = { exports: {} }; + var reactJsxRuntime_production_min = {}; + /* + object-assign + (c) Sindre Sorhus + @license MIT + */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === void 0) { + throw new TypeError( + "Object.assign cannot be called with null or undefined", + ); + } + return Object(val); + } + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + var test1 = new String("abc"); + test1[5] = "de"; + if (Object.getOwnPropertyNames(test1)[0] === "5") { + return false; + } + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2["_" + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n2) { + return test2[n2]; + }); + if (order2.join("") !== "0123456789") { + return false; + } + var test3 = {}; + "abcdefghijklmnopqrst".split("").forEach(function (letter) { + test3[letter] = letter; + }); + if ( + Object.keys(Object.assign({}, test3)).join("") !== + "abcdefghijklmnopqrst" + ) { + return false; + } + return true; + } catch (err) { + return false; + } + } + var objectAssign = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + return to; + }; + var react = { exports: {} }; + var react_production_min = {}; + /** @license React v17.0.2 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + var l$1 = objectAssign, + n$1 = 60103, + p$2 = 60106; + react_production_min.Fragment = 60107; + react_production_min.StrictMode = 60108; + react_production_min.Profiler = 60114; + var q$2 = 60109, + r$1 = 60110, + t = 60112; + react_production_min.Suspense = 60113; + var u$1 = 60115, + v = 60116; + if ("function" === typeof Symbol && Symbol.for) { + var w = Symbol.for; + n$1 = w("react.element"); + p$2 = w("react.portal"); + react_production_min.Fragment = w("react.fragment"); + react_production_min.StrictMode = w("react.strict_mode"); + react_production_min.Profiler = w("react.profiler"); + q$2 = w("react.provider"); + r$1 = w("react.context"); + t = w("react.forward_ref"); + react_production_min.Suspense = w("react.suspense"); + u$1 = w("react.memo"); + v = w("react.lazy"); + } + var x = "function" === typeof Symbol && Symbol.iterator; + function y(a) { + if (null === a || "object" !== typeof a) return null; + a = (x && a[x]) || a["@@iterator"]; + return "function" === typeof a ? a : null; + } + function z$1(a) { + for ( + var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, + c = 1; + c < arguments.length; + c++ + ) + b += "&args[]=" + encodeURIComponent(arguments[c]); + return ( + "Minified React error #" + + a + + "; visit " + + b + + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." + ); + } + var A = { + isMounted: function () { + return false; + }, + enqueueForceUpdate: function () {}, + enqueueReplaceState: function () {}, + enqueueSetState: function () {}, + }, + B$1 = {}; + function C(a, b, c) { + this.props = a; + this.context = b; + this.refs = B$1; + this.updater = c || A; + } + C.prototype.isReactComponent = {}; + C.prototype.setState = function (a, b) { + if ("object" !== typeof a && "function" !== typeof a && null != a) + throw Error(z$1(85)); + this.updater.enqueueSetState(this, a, b, "setState"); + }; + C.prototype.forceUpdate = function (a) { + this.updater.enqueueForceUpdate(this, a, "forceUpdate"); + }; + function D$1() {} + D$1.prototype = C.prototype; + function E$1(a, b, c) { + this.props = a; + this.context = b; + this.refs = B$1; + this.updater = c || A; + } + var F$1 = (E$1.prototype = new D$1()); + F$1.constructor = E$1; + l$1(F$1, C.prototype); + F$1.isPureReactComponent = true; + var G = { current: null }, + H = Object.prototype.hasOwnProperty, + I$1 = { key: true, ref: true, __self: true, __source: true }; + function J$1(a, b, c) { + var e, + d = {}, + k = null, + h2 = null; + if (null != b) + for (e in (void 0 !== b.ref && (h2 = b.ref), + void 0 !== b.key && (k = "" + b.key), + b)) + H.call(b, e) && !I$1.hasOwnProperty(e) && (d[e] = b[e]); + var g2 = arguments.length - 2; + if (1 === g2) d.children = c; + else if (1 < g2) { + for (var f2 = Array(g2), m2 = 0; m2 < g2; m2++) + f2[m2] = arguments[m2 + 2]; + d.children = f2; + } + if (a && a.defaultProps) + for (e in ((g2 = a.defaultProps), g2)) void 0 === d[e] && (d[e] = g2[e]); + return { + $$typeof: n$1, + type: a, + key: k, + ref: h2, + props: d, + _owner: G.current, + }; + } + function K$1(a, b) { + return { + $$typeof: n$1, + type: a.type, + key: b, + ref: a.ref, + props: a.props, + _owner: a._owner, + }; + } + function L(a) { + return "object" === typeof a && null !== a && a.$$typeof === n$1; + } + function escape(a) { + var b = { "=": "=0", ":": "=2" }; + return ( + "$" + + a.replace(/[=:]/g, function (a2) { + return b[a2]; + }) + ); + } + var M$1 = /\/+/g; + function N$1(a, b) { + return "object" === typeof a && null !== a && null != a.key + ? escape("" + a.key) + : b.toString(36); + } + function O$1(a, b, c, e, d) { + var k = typeof a; + if ("undefined" === k || "boolean" === k) a = null; + var h2 = false; + if (null === a) h2 = true; + else + switch (k) { + case "string": + case "number": + h2 = true; + break; + case "object": + switch (a.$$typeof) { + case n$1: + case p$2: + h2 = true; + } + } + if (h2) + return ( + (h2 = a), + (d = d(h2)), + (a = "" === e ? "." + N$1(h2, 0) : e), + Array.isArray(d) + ? ((c = ""), + null != a && (c = a.replace(M$1, "$&/") + "/"), + O$1(d, b, c, "", function (a2) { + return a2; + })) + : null != d && + (L(d) && + (d = K$1( + d, + c + + (!d.key || (h2 && h2.key === d.key) + ? "" + : ("" + d.key).replace(M$1, "$&/") + "/") + + a, + )), + b.push(d)), + 1 + ); + h2 = 0; + e = "" === e ? "." : e + ":"; + if (Array.isArray(a)) + for (var g2 = 0; g2 < a.length; g2++) { + k = a[g2]; + var f2 = e + N$1(k, g2); + h2 += O$1(k, b, c, f2, d); + } + else if (((f2 = y(a)), "function" === typeof f2)) + for (a = f2.call(a), g2 = 0; !(k = a.next()).done; ) + (k = k.value), (f2 = e + N$1(k, g2++)), (h2 += O$1(k, b, c, f2, d)); + else if ("object" === k) + throw ( + ((b = "" + a), + Error( + z$1( + 31, + "[object Object]" === b + ? "object with keys {" + Object.keys(a).join(", ") + "}" + : b, + ), + )) + ); + return h2; + } + function P$1(a, b, c) { + if (null == a) return a; + var e = [], + d = 0; + O$1(a, e, "", "", function (a2) { + return b.call(c, a2, d++); + }); + return e; + } + function Q$1(a) { + if (-1 === a._status) { + var b = a._result; + b = b(); + a._status = 0; + a._result = b; + b.then( + function (b2) { + 0 === a._status && + ((b2 = b2.default), (a._status = 1), (a._result = b2)); + }, + function (b2) { + 0 === a._status && ((a._status = 2), (a._result = b2)); + }, + ); + } + if (1 === a._status) return a._result; + throw a._result; + } + var R$1 = { current: null }; + function S$1() { + var a = R$1.current; + if (null === a) throw Error(z$1(321)); + return a; + } + var T$1 = { + ReactCurrentDispatcher: R$1, + ReactCurrentBatchConfig: { transition: 0 }, + ReactCurrentOwner: G, + IsSomeRendererActing: { current: false }, + assign: l$1, + }; + react_production_min.Children = { + map: P$1, + forEach: function (a, b, c) { + P$1( + a, + function () { + b.apply(this, arguments); + }, + c, + ); + }, + count: function (a) { + var b = 0; + P$1(a, function () { + b++; + }); + return b; + }, + toArray: function (a) { + return ( + P$1(a, function (a2) { + return a2; + }) || [] + ); + }, + only: function (a) { + if (!L(a)) throw Error(z$1(143)); + return a; + }, + }; + react_production_min.Component = C; + react_production_min.PureComponent = E$1; + react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = T$1; + react_production_min.cloneElement = function (a, b, c) { + if (null === a || void 0 === a) throw Error(z$1(267, a)); + var e = l$1({}, a.props), + d = a.key, + k = a.ref, + h2 = a._owner; + if (null != b) { + void 0 !== b.ref && ((k = b.ref), (h2 = G.current)); + void 0 !== b.key && (d = "" + b.key); + if (a.type && a.type.defaultProps) var g2 = a.type.defaultProps; + for (f2 in b) + H.call(b, f2) && + !I$1.hasOwnProperty(f2) && + (e[f2] = void 0 === b[f2] && void 0 !== g2 ? g2[f2] : b[f2]); + } + var f2 = arguments.length - 2; + if (1 === f2) e.children = c; + else if (1 < f2) { + g2 = Array(f2); + for (var m2 = 0; m2 < f2; m2++) g2[m2] = arguments[m2 + 2]; + e.children = g2; + } + return { + $$typeof: n$1, + type: a.type, + key: d, + ref: k, + props: e, + _owner: h2, + }; + }; + react_production_min.createContext = function (a, b) { + void 0 === b && (b = null); + a = { + $$typeof: r$1, + _calculateChangedBits: b, + _currentValue: a, + _currentValue2: a, + _threadCount: 0, + Provider: null, + Consumer: null, + }; + a.Provider = { $$typeof: q$2, _context: a }; + return (a.Consumer = a); + }; + react_production_min.createElement = J$1; + react_production_min.createFactory = function (a) { + var b = J$1.bind(null, a); + b.type = a; + return b; + }; + react_production_min.createRef = function () { + return { current: null }; + }; + react_production_min.forwardRef = function (a) { + return { $$typeof: t, render: a }; + }; + react_production_min.isValidElement = L; + react_production_min.lazy = function (a) { + return { $$typeof: v, _payload: { _status: -1, _result: a }, _init: Q$1 }; + }; + react_production_min.memo = function (a, b) { + return { $$typeof: u$1, type: a, compare: void 0 === b ? null : b }; + }; + react_production_min.useCallback = function (a, b) { + return S$1().useCallback(a, b); + }; + react_production_min.useContext = function (a, b) { + return S$1().useContext(a, b); + }; + react_production_min.useDebugValue = function () {}; + react_production_min.useEffect = function (a, b) { + return S$1().useEffect(a, b); + }; + react_production_min.useImperativeHandle = function (a, b, c) { + return S$1().useImperativeHandle(a, b, c); + }; + react_production_min.useLayoutEffect = function (a, b) { + return S$1().useLayoutEffect(a, b); + }; + react_production_min.useMemo = function (a, b) { + return S$1().useMemo(a, b); + }; + react_production_min.useReducer = function (a, b, c) { + return S$1().useReducer(a, b, c); + }; + react_production_min.useRef = function (a) { + return S$1().useRef(a); + }; + react_production_min.useState = function (a) { + return S$1().useState(a); + }; + react_production_min.version = "17.0.2"; + { + react.exports = react_production_min; + } + var reactExports = react.exports; + /** @license React v17.0.2 + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + var f = reactExports, + g = 60103; + reactJsxRuntime_production_min.Fragment = 60107; + if ("function" === typeof Symbol && Symbol.for) { + var h = Symbol.for; + g = h("react.element"); + reactJsxRuntime_production_min.Fragment = h("react.fragment"); + } + var m$1 = + f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, + n = Object.prototype.hasOwnProperty, + p$1 = { key: true, ref: true, __self: true, __source: true }; + function q$1(c, a, k) { + var b, + d = {}, + e = null, + l2 = null; + void 0 !== k && (e = "" + k); + void 0 !== a.key && (e = "" + a.key); + void 0 !== a.ref && (l2 = a.ref); + for (b in a) n.call(a, b) && !p$1.hasOwnProperty(b) && (d[b] = a[b]); + if (c && c.defaultProps) + for (b in ((a = c.defaultProps), a)) void 0 === d[b] && (d[b] = a[b]); + return { + $$typeof: g, + type: c, + key: e, + ref: l2, + props: d, + _owner: m$1.current, + }; + } + reactJsxRuntime_production_min.jsx = q$1; + reactJsxRuntime_production_min.jsxs = q$1; + { + jsxRuntime.exports = reactJsxRuntime_production_min; + } + var jsxRuntimeExports = jsxRuntime.exports; + var server_browser = { exports: {} }; + var reactDomServer_browser_production_min = {}; + /** @license React v17.0.2 + * react-dom-server.browser.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + var l = objectAssign, + m = reactExports; + function p(a) { + for ( + var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, + c = 1; + c < arguments.length; + c++ + ) + b += "&args[]=" + encodeURIComponent(arguments[c]); + return ( + "Minified React error #" + + a + + "; visit " + + b + + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." + ); + } + var q = 60106, + r = 60107, + u = 60108, + z = 60114, + B = 60109, + aa = 60110, + ba = 60112, + D = 60113, + ca = 60120, + da = 60115, + ea = 60116, + fa = 60121, + ha = 60117, + ia = 60119, + ja = 60129, + ka = 60131; + if ("function" === typeof Symbol && Symbol.for) { + var E = Symbol.for; + q = E("react.portal"); + r = E("react.fragment"); + u = E("react.strict_mode"); + z = E("react.profiler"); + B = E("react.provider"); + aa = E("react.context"); + ba = E("react.forward_ref"); + D = E("react.suspense"); + ca = E("react.suspense_list"); + da = E("react.memo"); + ea = E("react.lazy"); + fa = E("react.block"); + ha = E("react.fundamental"); + ia = E("react.scope"); + ja = E("react.debug_trace_mode"); + ka = E("react.legacy_hidden"); + } + function F(a) { + if (null == a) return null; + if ("function" === typeof a) return a.displayName || a.name || null; + if ("string" === typeof a) return a; + switch (a) { + case r: + return "Fragment"; + case q: + return "Portal"; + case z: + return "Profiler"; + case u: + return "StrictMode"; + case D: + return "Suspense"; + case ca: + return "SuspenseList"; + } + if ("object" === typeof a) + switch (a.$$typeof) { + case aa: + return (a.displayName || "Context") + ".Consumer"; + case B: + return (a._context.displayName || "Context") + ".Provider"; + case ba: + var b = a.render; + b = b.displayName || b.name || ""; + return ( + a.displayName || ("" !== b ? "ForwardRef(" + b + ")" : "ForwardRef") + ); + case da: + return F(a.type); + case fa: + return F(a._render); + case ea: + b = a._payload; + a = a._init; + try { + return F(a(b)); + } catch (c) {} + } + return null; + } + var la = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + ma = {}; + function I(a, b) { + for (var c = a._threadCount | 0; c <= b; c++) + (a[c] = a._currentValue2), (a._threadCount = c + 1); + } + function na(a, b, c, d) { + if (d && ((d = a.contextType), "object" === typeof d && null !== d)) + return I(d, c), d[c]; + if ((a = a.contextTypes)) { + c = {}; + for (var f2 in a) c[f2] = b[f2]; + b = c; + } else b = ma; + return b; + } + for (var J = new Uint16Array(16), K = 0; 15 > K; K++) J[K] = K + 1; + J[15] = 0; + var oa = + /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, + pa = Object.prototype.hasOwnProperty, + qa = {}, + ra = {}; + function sa(a) { + if (pa.call(ra, a)) return true; + if (pa.call(qa, a)) return false; + if (oa.test(a)) return (ra[a] = true); + qa[a] = true; + return false; + } + function ta(a, b, c, d) { + if (null !== c && 0 === c.type) return false; + switch (typeof b) { + case "function": + case "symbol": + return true; + case "boolean": + if (d) return false; + if (null !== c) return !c.acceptsBooleans; + a = a.toLowerCase().slice(0, 5); + return "data-" !== a && "aria-" !== a; + default: + return false; + } + } + function ua(a, b, c, d) { + if (null === b || "undefined" === typeof b || ta(a, b, c, d)) return true; + if (d) return false; + if (null !== c) + switch (c.type) { + case 3: + return !b; + case 4: + return false === b; + case 5: + return isNaN(b); + case 6: + return isNaN(b) || 1 > b; + } + return false; + } + function M(a, b, c, d, f2, h2, t2) { + this.acceptsBooleans = 2 === b || 3 === b || 4 === b; + this.attributeName = d; + this.attributeNamespace = f2; + this.mustUseProperty = c; + this.propertyName = a; + this.type = b; + this.sanitizeURL = h2; + this.removeEmptyString = t2; + } + var N = {}; + "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style" + .split(" ") + .forEach(function (a) { + N[a] = new M(a, 0, false, a, null, false, false); + }); + [ + ["acceptCharset", "accept-charset"], + ["className", "class"], + ["htmlFor", "for"], + ["httpEquiv", "http-equiv"], + ].forEach(function (a) { + var b = a[0]; + N[b] = new M(b, 1, false, a[1], null, false, false); + }); + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (a) { + N[a] = new M(a, 2, false, a.toLowerCase(), null, false, false); + }); + [ + "autoReverse", + "externalResourcesRequired", + "focusable", + "preserveAlpha", + ].forEach(function (a) { + N[a] = new M(a, 2, false, a, null, false, false); + }); + "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope" + .split(" ") + .forEach(function (a) { + N[a] = new M(a, 3, false, a.toLowerCase(), null, false, false); + }); + ["checked", "multiple", "muted", "selected"].forEach(function (a) { + N[a] = new M(a, 3, true, a, null, false, false); + }); + ["capture", "download"].forEach(function (a) { + N[a] = new M(a, 4, false, a, null, false, false); + }); + ["cols", "rows", "size", "span"].forEach(function (a) { + N[a] = new M(a, 6, false, a, null, false, false); + }); + ["rowSpan", "start"].forEach(function (a) { + N[a] = new M(a, 5, false, a.toLowerCase(), null, false, false); + }); + var va = /[\-:]([a-z])/g; + function wa(a) { + return a[1].toUpperCase(); + } + "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height" + .split(" ") + .forEach(function (a) { + var b = a.replace(va, wa); + N[b] = new M(b, 1, false, a, null, false, false); + }); + "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type" + .split(" ") + .forEach(function (a) { + var b = a.replace(va, wa); + N[b] = new M( + b, + 1, + false, + a, + "http://www.w3.org/1999/xlink", + false, + false, + ); + }); + ["xml:base", "xml:lang", "xml:space"].forEach(function (a) { + var b = a.replace(va, wa); + N[b] = new M( + b, + 1, + false, + a, + "http://www.w3.org/XML/1998/namespace", + false, + false, + ); + }); + ["tabIndex", "crossOrigin"].forEach(function (a) { + N[a] = new M(a, 1, false, a.toLowerCase(), null, false, false); + }); + N.xlinkHref = new M( + "xlinkHref", + 1, + false, + "xlink:href", + "http://www.w3.org/1999/xlink", + true, + false, + ); + ["src", "href", "action", "formAction"].forEach(function (a) { + N[a] = new M(a, 1, false, a.toLowerCase(), null, true, true); + }); + var xa = /["'&<>]/; + function O(a) { + if ("boolean" === typeof a || "number" === typeof a) return "" + a; + a = "" + a; + var b = xa.exec(a); + if (b) { + var c = "", + d, + f2 = 0; + for (d = b.index; d < a.length; d++) { + switch (a.charCodeAt(d)) { + case 34: + b = """; + break; + case 38: + b = "&"; + break; + case 39: + b = "'"; + break; + case 60: + b = "<"; + break; + case 62: + b = ">"; + break; + default: + continue; + } + f2 !== d && (c += a.substring(f2, d)); + f2 = d + 1; + c += b; + } + a = f2 !== d ? c + a.substring(f2, d) : c; + } + return a; + } + function ya(a, b) { + var c = N.hasOwnProperty(a) ? N[a] : null; + var d; + if ((d = "style" !== a)) + d = + null !== c + ? 0 === c.type + : !(2 < a.length) || + ("o" !== a[0] && "O" !== a[0]) || + ("n" !== a[1] && "N" !== a[1]) + ? false + : true; + if (d || ua(a, b, c, false)) return ""; + if (null !== c) { + a = c.attributeName; + d = c.type; + if (3 === d || (4 === d && true === b)) return a + '=""'; + c.sanitizeURL && (b = "" + b); + return a + '="' + (O(b) + '"'); + } + return sa(a) ? a + '="' + (O(b) + '"') : ""; + } + function za(a, b) { + return (a === b && (0 !== a || 1 / a === 1 / b)) || (a !== a && b !== b); + } + var Aa = "function" === typeof Object.is ? Object.is : za, + P = null, + Q = null, + R = null, + S = false, + T = false, + U = null, + V = 0; + function W() { + if (null === P) throw Error(p(321)); + return P; + } + function Ba() { + if (0 < V) throw Error(p(312)); + return { memoizedState: null, queue: null, next: null }; + } + function Ca() { + null === R + ? null === Q + ? ((S = false), (Q = R = Ba())) + : ((S = true), (R = Q)) + : null === R.next + ? ((S = false), (R = R.next = Ba())) + : ((S = true), (R = R.next)); + return R; + } + function Da(a, b, c, d) { + for (; T; ) (T = false), (V += 1), (R = null), (c = a(b, d)); + Ea(); + return c; + } + function Ea() { + P = null; + T = false; + Q = null; + V = 0; + R = U = null; + } + function Fa(a, b) { + return "function" === typeof b ? b(a) : b; + } + function Ga(a, b, c) { + P = W(); + R = Ca(); + if (S) { + var d = R.queue; + b = d.dispatch; + if (null !== U && ((c = U.get(d)), void 0 !== c)) { + U.delete(d); + d = R.memoizedState; + do (d = a(d, c.action)), (c = c.next); + while (null !== c); + R.memoizedState = d; + return [d, b]; + } + return [R.memoizedState, b]; + } + a = + a === Fa ? ("function" === typeof b ? b() : b) : void 0 !== c ? c(b) : b; + R.memoizedState = a; + a = R.queue = { last: null, dispatch: null }; + a = a.dispatch = Ha.bind(null, P, a); + return [R.memoizedState, a]; + } + function Ia(a, b) { + P = W(); + R = Ca(); + b = void 0 === b ? null : b; + if (null !== R) { + var c = R.memoizedState; + if (null !== c && null !== b) { + var d = c[1]; + a: if (null === d) d = false; + else { + for (var f2 = 0; f2 < d.length && f2 < b.length; f2++) + if (!Aa(b[f2], d[f2])) { + d = false; + break a; + } + d = true; + } + if (d) return c[0]; + } + } + a = a(); + R.memoizedState = [a, b]; + return a; + } + function Ha(a, b, c) { + if (!(25 > V)) throw Error(p(301)); + if (a === P) + if ( + ((T = true), + (a = { action: c, next: null }), + null === U && (U = /* @__PURE__ */ new Map()), + (c = U.get(b)), + void 0 === c) + ) + U.set(b, a); + else { + for (b = c; null !== b.next; ) b = b.next; + b.next = a; + } + } + function Ja() {} + var X = null, + Ka = { + readContext: function (a) { + var b = X.threadID; + I(a, b); + return a[b]; + }, + useContext: function (a) { + W(); + var b = X.threadID; + I(a, b); + return a[b]; + }, + useMemo: Ia, + useReducer: Ga, + useRef: function (a) { + P = W(); + R = Ca(); + var b = R.memoizedState; + return null === b ? ((a = { current: a }), (R.memoizedState = a)) : b; + }, + useState: function (a) { + return Ga(Fa, a); + }, + useLayoutEffect: function () {}, + useCallback: function (a, b) { + return Ia(function () { + return a; + }, b); + }, + useImperativeHandle: Ja, + useEffect: Ja, + useDebugValue: Ja, + useDeferredValue: function (a) { + W(); + return a; + }, + useTransition: function () { + W(); + return [ + function (a) { + a(); + }, + false, + ]; + }, + useOpaqueIdentifier: function () { + return (X.identifierPrefix || "") + "R:" + (X.uniqueID++).toString(36); + }, + useMutableSource: function (a, b) { + W(); + return b(a._source); + }, + }, + La = { + html: "http://www.w3.org/1999/xhtml", + mathml: "http://www.w3.org/1998/Math/MathML", + svg: "http://www.w3.org/2000/svg", + }; + function Ma(a) { + switch (a) { + case "svg": + return "http://www.w3.org/2000/svg"; + case "math": + return "http://www.w3.org/1998/Math/MathML"; + default: + return "http://www.w3.org/1999/xhtml"; + } + } + var Na = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, + }, + Oa = l({ menuitem: true }, Na), + Y = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }, + Pa = ["Webkit", "ms", "Moz", "O"]; + Object.keys(Y).forEach(function (a) { + Pa.forEach(function (b) { + b = b + a.charAt(0).toUpperCase() + a.substring(1); + Y[b] = Y[a]; + }); + }); + var Qa = /([A-Z])/g, + Ra = /^ms-/, + Z = m.Children.toArray, + Sa = la.ReactCurrentDispatcher, + Ta = { listing: true, pre: true, textarea: true }, + Ua = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, + Va = {}, + Wa = {}; + function Xa(a) { + if (void 0 === a || null === a) return a; + var b = ""; + m.Children.forEach(a, function (a2) { + null != a2 && (b += a2); + }); + return b; + } + var Ya = Object.prototype.hasOwnProperty, + Za = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null, + suppressHydrationWarning: null, + }; + function $a(a, b) { + if (void 0 === a) throw Error(p(152, F(b) || "Component")); + } + function ab(a, b, c) { + function d(d2, h3) { + var e = h3.prototype && h3.prototype.isReactComponent, + f3 = na(h3, b, c, e), + t2 = [], + g2 = false, + n2 = { + isMounted: function () { + return false; + }, + enqueueForceUpdate: function () { + if (null === t2) return null; + }, + enqueueReplaceState: function (a2, c2) { + g2 = true; + t2 = [c2]; + }, + enqueueSetState: function (a2, c2) { + if (null === t2) return null; + t2.push(c2); + }, + }; + if (e) { + if ( + ((e = new h3(d2.props, f3, n2)), + "function" === typeof h3.getDerivedStateFromProps) + ) { + var k = h3.getDerivedStateFromProps.call(null, d2.props, e.state); + null != k && (e.state = l({}, e.state, k)); + } + } else if ( + ((P = {}), + (e = h3(d2.props, f3, n2)), + (e = Da(h3, d2.props, e, f3)), + null == e || null == e.render) + ) { + a = e; + $a(a, h3); + return; + } + e.props = d2.props; + e.context = f3; + e.updater = n2; + n2 = e.state; + void 0 === n2 && (e.state = n2 = null); + if ( + "function" === typeof e.UNSAFE_componentWillMount || + "function" === typeof e.componentWillMount + ) + if ( + ("function" === typeof e.componentWillMount && + "function" !== typeof h3.getDerivedStateFromProps && + e.componentWillMount(), + "function" === typeof e.UNSAFE_componentWillMount && + "function" !== typeof h3.getDerivedStateFromProps && + e.UNSAFE_componentWillMount(), + t2.length) + ) { + n2 = t2; + var v2 = g2; + t2 = null; + g2 = false; + if (v2 && 1 === n2.length) e.state = n2[0]; + else { + k = v2 ? n2[0] : e.state; + var H2 = true; + for (v2 = v2 ? 1 : 0; v2 < n2.length; v2++) { + var x2 = n2[v2]; + x2 = "function" === typeof x2 ? x2.call(e, k, d2.props, f3) : x2; + null != x2 && + (H2 ? ((H2 = false), (k = l({}, k, x2))) : l(k, x2)); + } + e.state = k; + } + } else t2 = null; + a = e.render(); + $a(a, h3); + if ( + "function" === typeof e.getChildContext && + ((d2 = h3.childContextTypes), "object" === typeof d2) + ) { + var y2 = e.getChildContext(); + for (var A2 in y2) + if (!(A2 in d2)) throw Error(p(108, F(h3) || "Unknown", A2)); + } + y2 && (b = l({}, b, y2)); + } + for (; m.isValidElement(a); ) { + var f2 = a, + h2 = f2.type; + if ("function" !== typeof h2) break; + d(f2, h2); + } + return { child: a, context: b }; + } + var bb = (function () { + function a(a2, b2, f2) { + m.isValidElement(a2) + ? a2.type !== r + ? (a2 = [a2]) + : ((a2 = a2.props.children), + (a2 = m.isValidElement(a2) ? [a2] : Z(a2))) + : (a2 = Z(a2)); + a2 = { + type: null, + domNamespace: La.html, + children: a2, + childIndex: 0, + context: ma, + footer: "", + }; + var c = J[0]; + if (0 === c) { + var d = J; + c = d.length; + var g2 = 2 * c; + if (!(65536 >= g2)) throw Error(p(304)); + var e = new Uint16Array(g2); + e.set(d); + J = e; + J[0] = c + 1; + for (d = c; d < g2 - 1; d++) J[d] = d + 1; + J[g2 - 1] = 0; + } else J[0] = J[c]; + this.threadID = c; + this.stack = [a2]; + this.exhausted = false; + this.currentSelectValue = null; + this.previousWasTextNode = false; + this.makeStaticMarkup = b2; + this.suspenseDepth = 0; + this.contextIndex = -1; + this.contextStack = []; + this.contextValueStack = []; + this.uniqueID = 0; + this.identifierPrefix = (f2 && f2.identifierPrefix) || ""; + } + var b = a.prototype; + b.destroy = function () { + if (!this.exhausted) { + this.exhausted = true; + this.clearProviders(); + var a2 = this.threadID; + J[a2] = J[0]; + J[0] = a2; + } + }; + b.pushProvider = function (a2) { + var b2 = ++this.contextIndex, + c = a2.type._context, + h2 = this.threadID; + I(c, h2); + var t2 = c[h2]; + this.contextStack[b2] = c; + this.contextValueStack[b2] = t2; + c[h2] = a2.props.value; + }; + b.popProvider = function () { + var a2 = this.contextIndex, + b2 = this.contextStack[a2], + f2 = this.contextValueStack[a2]; + this.contextStack[a2] = null; + this.contextValueStack[a2] = null; + this.contextIndex--; + b2[this.threadID] = f2; + }; + b.clearProviders = function () { + for (var a2 = this.contextIndex; 0 <= a2; a2--) + this.contextStack[a2][this.threadID] = this.contextValueStack[a2]; + }; + b.read = function (a2) { + if (this.exhausted) return null; + var b2 = X; + X = this; + var c = Sa.current; + Sa.current = Ka; + try { + for (var h2 = [""], t2 = false; h2[0].length < a2; ) { + if (0 === this.stack.length) { + this.exhausted = true; + var g2 = this.threadID; + J[g2] = J[0]; + J[0] = g2; + break; + } + var e = this.stack[this.stack.length - 1]; + if (t2 || e.childIndex >= e.children.length) { + var L2 = e.footer; + "" !== L2 && (this.previousWasTextNode = false); + this.stack.pop(); + if ("select" === e.type) this.currentSelectValue = null; + else if ( + null != e.type && + null != e.type.type && + e.type.type.$$typeof === B + ) + this.popProvider(e.type); + else if (e.type === D) { + this.suspenseDepth--; + var G2 = h2.pop(); + if (t2) { + t2 = false; + var C2 = e.fallbackFrame; + if (!C2) throw Error(p(303)); + this.stack.push(C2); + h2[this.suspenseDepth] += ""; + continue; + } else h2[this.suspenseDepth] += G2; + } + h2[this.suspenseDepth] += L2; + } else { + var n2 = e.children[e.childIndex++], + k = ""; + try { + k += this.render(n2, e.context, e.domNamespace); + } catch (v2) { + if (null != v2 && "function" === typeof v2.then) + throw Error(p(294)); + throw v2; + } finally { + } + h2.length <= this.suspenseDepth && h2.push(""); + h2[this.suspenseDepth] += k; + } + } + return h2[0]; + } finally { + (Sa.current = c), (X = b2), Ea(); + } + }; + b.render = function (a2, b2, f2) { + if ("string" === typeof a2 || "number" === typeof a2) { + f2 = "" + a2; + if ("" === f2) return ""; + if (this.makeStaticMarkup) return O(f2); + if (this.previousWasTextNode) return "" + O(f2); + this.previousWasTextNode = true; + return O(f2); + } + b2 = ab(a2, b2, this.threadID); + a2 = b2.child; + b2 = b2.context; + if (null === a2 || false === a2) return ""; + if (!m.isValidElement(a2)) { + if (null != a2 && null != a2.$$typeof) { + f2 = a2.$$typeof; + if (f2 === q) throw Error(p(257)); + throw Error(p(258, f2.toString())); + } + a2 = Z(a2); + this.stack.push({ + type: null, + domNamespace: f2, + children: a2, + childIndex: 0, + context: b2, + footer: "", + }); + return ""; + } + var c = a2.type; + if ("string" === typeof c) return this.renderDOM(a2, b2, f2); + switch (c) { + case ka: + case ja: + case u: + case z: + case ca: + case r: + return ( + (a2 = Z(a2.props.children)), + this.stack.push({ + type: null, + domNamespace: f2, + children: a2, + childIndex: 0, + context: b2, + footer: "", + }), + "" + ); + case D: + throw Error(p(294)); + case ia: + throw Error(p(343)); + } + if ("object" === typeof c && null !== c) + switch (c.$$typeof) { + case ba: + P = {}; + var d = c.render(a2.props, a2.ref); + d = Da(c.render, a2.props, d, a2.ref); + d = Z(d); + this.stack.push({ + type: null, + domNamespace: f2, + children: d, + childIndex: 0, + context: b2, + footer: "", + }); + return ""; + case da: + return ( + (a2 = [m.createElement(c.type, l({ ref: a2.ref }, a2.props))]), + this.stack.push({ + type: null, + domNamespace: f2, + children: a2, + childIndex: 0, + context: b2, + footer: "", + }), + "" + ); + case B: + return ( + (c = Z(a2.props.children)), + (f2 = { + type: a2, + domNamespace: f2, + children: c, + childIndex: 0, + context: b2, + footer: "", + }), + this.pushProvider(a2), + this.stack.push(f2), + "" + ); + case aa: + c = a2.type; + d = a2.props; + var g2 = this.threadID; + I(c, g2); + c = Z(d.children(c[g2])); + this.stack.push({ + type: a2, + domNamespace: f2, + children: c, + childIndex: 0, + context: b2, + footer: "", + }); + return ""; + case ha: + throw Error(p(338)); + case ea: + return ( + (c = a2.type), + (d = c._init), + (c = d(c._payload)), + (a2 = [m.createElement(c, l({ ref: a2.ref }, a2.props))]), + this.stack.push({ + type: null, + domNamespace: f2, + children: a2, + childIndex: 0, + context: b2, + footer: "", + }), + "" + ); + } + throw Error(p(130, null == c ? c : typeof c, "")); + }; + b.renderDOM = function (a2, b2, f2) { + var c = a2.type.toLowerCase(); + if (!Va.hasOwnProperty(c)) { + if (!Ua.test(c)) throw Error(p(65, c)); + Va[c] = true; + } + var d = a2.props; + if ("input" === c) + d = l({ type: void 0 }, d, { + defaultChecked: void 0, + defaultValue: void 0, + value: null != d.value ? d.value : d.defaultValue, + checked: null != d.checked ? d.checked : d.defaultChecked, + }); + else if ("textarea" === c) { + var g2 = d.value; + if (null == g2) { + g2 = d.defaultValue; + var e = d.children; + if (null != e) { + if (null != g2) throw Error(p(92)); + if (Array.isArray(e)) { + if (!(1 >= e.length)) throw Error(p(93)); + e = e[0]; + } + g2 = "" + e; + } + null == g2 && (g2 = ""); + } + d = l({}, d, { value: void 0, children: "" + g2 }); + } else if ("select" === c) + (this.currentSelectValue = null != d.value ? d.value : d.defaultValue), + (d = l({}, d, { value: void 0 })); + else if ("option" === c) { + e = this.currentSelectValue; + var L2 = Xa(d.children); + if (null != e) { + var G2 = null != d.value ? d.value + "" : L2; + g2 = false; + if (Array.isArray(e)) + for (var C2 = 0; C2 < e.length; C2++) { + if ("" + e[C2] === G2) { + g2 = true; + break; + } + } + else g2 = "" + e === G2; + d = l({ selected: void 0, children: void 0 }, d, { + selected: g2, + children: L2, + }); + } + } + if ((g2 = d)) { + if ( + Oa[c] && + (null != g2.children || null != g2.dangerouslySetInnerHTML) + ) + throw Error(p(137, c)); + if (null != g2.dangerouslySetInnerHTML) { + if (null != g2.children) throw Error(p(60)); + if ( + !( + "object" === typeof g2.dangerouslySetInnerHTML && + "__html" in g2.dangerouslySetInnerHTML + ) + ) + throw Error(p(61)); + } + if (null != g2.style && "object" !== typeof g2.style) + throw Error(p(62)); + } + g2 = d; + e = this.makeStaticMarkup; + L2 = 1 === this.stack.length; + G2 = "<" + a2.type; + b: if (-1 === c.indexOf("-")) C2 = "string" === typeof g2.is; + else + switch (c) { + case "annotation-xml": + case "color-profile": + case "font-face": + case "font-face-src": + case "font-face-uri": + case "font-face-format": + case "font-face-name": + case "missing-glyph": + C2 = false; + break b; + default: + C2 = true; + } + for (w2 in g2) + if (Ya.call(g2, w2)) { + var n2 = g2[w2]; + if (null != n2) { + if ("style" === w2) { + var k = void 0, + v2 = "", + H2 = ""; + for (k in n2) + if (n2.hasOwnProperty(k)) { + var x2 = 0 === k.indexOf("--"), + y2 = n2[k]; + if (null != y2) { + if (x2) var A2 = k; + else if (((A2 = k), Wa.hasOwnProperty(A2))) A2 = Wa[A2]; + else { + var cb = A2.replace(Qa, "-$1") + .toLowerCase() + .replace(Ra, "-ms-"); + A2 = Wa[A2] = cb; + } + v2 += H2 + A2 + ":"; + H2 = k; + x2 = + null == y2 || "boolean" === typeof y2 || "" === y2 + ? "" + : x2 || + "number" !== typeof y2 || + 0 === y2 || + (Y.hasOwnProperty(H2) && Y[H2]) + ? ("" + y2).trim() + : y2 + "px"; + v2 += x2; + H2 = ";"; + } + } + n2 = v2 || null; + } + k = null; + C2 + ? Za.hasOwnProperty(w2) || + ((k = w2), + (k = sa(k) && null != n2 ? k + '="' + (O(n2) + '"') : "")) + : (k = ya(w2, n2)); + k && (G2 += " " + k); + } + } + e || (L2 && (G2 += ' data-reactroot=""')); + var w2 = G2; + g2 = ""; + Na.hasOwnProperty(c) + ? (w2 += "/>") + : ((w2 += ">"), (g2 = "")); + a: { + e = d.dangerouslySetInnerHTML; + if (null != e) { + if (null != e.__html) { + e = e.__html; + break a; + } + } else if ( + ((e = d.children), "string" === typeof e || "number" === typeof e) + ) { + e = O(e); + break a; + } + e = null; + } + null != e + ? ((d = []), + Ta.hasOwnProperty(c) && "\n" === e.charAt(0) && (w2 += "\n"), + (w2 += e)) + : (d = Z(d.children)); + a2 = a2.type; + f2 = + null == f2 || "http://www.w3.org/1999/xhtml" === f2 + ? Ma(a2) + : "http://www.w3.org/2000/svg" === f2 && "foreignObject" === a2 + ? "http://www.w3.org/1999/xhtml" + : f2; + this.stack.push({ + domNamespace: f2, + type: c, + children: d, + childIndex: 0, + context: b2, + footer: g2, + }); + this.previousWasTextNode = false; + return w2; + }; + return a; + })(); + reactDomServer_browser_production_min.renderToNodeStream = function () { + throw Error(p(207)); + }; + reactDomServer_browser_production_min.renderToStaticMarkup = function (a, b) { + a = new bb(a, true, b); + try { + return a.read(Infinity); + } finally { + a.destroy(); + } + }; + reactDomServer_browser_production_min.renderToStaticNodeStream = function () { + throw Error(p(208)); + }; + reactDomServer_browser_production_min.renderToString = function (a, b) { + a = new bb(a, false, b); + try { + return a.read(Infinity); + } finally { + a.destroy(); + } + }; + reactDomServer_browser_production_min.version = "17.0.2"; + { + server_browser.exports = reactDomServer_browser_production_min; + } + var server_browserExports = server_browser.exports; + function App() { + return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [jsxRuntimeExports.jsxs("div", { children: [] })], + }); + } + const Index = () => { + return server_browserExports.renderToString( + /* @__PURE__ */ jsxRuntimeExports.jsx(App, {}), + ); + }; + exports.Index = Index; + Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); + return exports; +})({}); diff --git a/tests/react.rs b/tests/react.rs new file mode 100644 index 0000000..b49797c --- /dev/null +++ b/tests/react.rs @@ -0,0 +1,24 @@ +use ssr_rs::Ssr; +use std::fs::read_to_string; +use std::sync::Once; + +static INIT: Once = Once::new(); + +fn prepare() { + INIT.call_once(|| { + Ssr::create_platform(); + }) +} + +#[test] +fn renders_react_17_exported_as_iife() { + prepare(); + + let source = read_to_string("./tests/assets/react-17-iife.js").unwrap(); + + let mut js = Ssr::from(source, "").unwrap(); + + let html = js.render_to_string(None).unwrap(); + + assert_eq!(html, "
"); +}