├── prettier.config.cjs ├── tsup.config.ts ├── .github └── workflows │ └── test.yml ├── LICENSE ├── package.json ├── src ├── main.mts ├── reactVersions.mts ├── build-plugin.mts ├── index.mts └── build-plugin.test.mts ├── .gitignore ├── README.md ├── assets └── react │ ├── 18.2.0 │ ├── react-jsx-runtime.production.min.js.map │ └── react.production.min.js.map │ ├── 18.3.1 │ └── react-jsx-runtime.production.min.js.map │ ├── 17.0.2 │ └── react.production.min.js.map │ └── 18.1.0 │ └── react.production.min.js.map └── tsconfig.json /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | semi: true, 3 | singleQuote: false, 4 | tabWidth: 2, 5 | trailingComma: "es5", 6 | arrowParens: "avoid", 7 | printWidth: 100, 8 | }; 9 | 10 | module.exports = config; 11 | -------------------------------------------------------------------------------- /tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "tsup"; 2 | 3 | export default defineConfig(options => ({ 4 | entry: ["src/index.mts"], 5 | dts: true, 6 | outDir: "lib", 7 | format: ["esm", "cjs"], 8 | clean: true, 9 | outExtension({ format }) { 10 | return { 11 | dts: ".d.ts", 12 | js: format === "cjs" ? `.cjs` : `.mjs`, 13 | }; 14 | }, 15 | })); 16 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | pull_request: 5 | jobs: 6 | test: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Check out repository code 10 | uses: actions/checkout@v3 11 | - name: Setup node 12 | uses: actions/setup-node@v3 13 | with: 14 | node-version: '20' 15 | - run: yarn install --frozen-lockfile 16 | - run: yarn test -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Mark Erikson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@acemarke/react-prod-sourcemaps", 3 | "version": "0.3.1", 4 | "description": "A tool to update app sourcemaps with the original code of ReactDOM's production builds", 5 | "repository": "https://github.com/markerikson/react-prod-sourcemaps", 6 | "author": "Mark Erikson", 7 | "license": "MIT", 8 | "private": false, 9 | "publishConfig": { 10 | "access": "public" 11 | }, 12 | "types": "./lib/index.d.ts", 13 | "main": "./lib/index.cjs", 14 | "module": "./lib/index.mjs", 15 | "exports": { 16 | ".": { 17 | "import": { 18 | "types": "./lib/index.d.mts", 19 | "default": "./lib/index.mjs" 20 | }, 21 | "require": { 22 | "types": "./lib/index.d.ts", 23 | "default": "./lib/index.cjs" 24 | } 25 | } 26 | }, 27 | "bin": { 28 | "react-prod-sourcemaps": "lib/index.cjs" 29 | }, 30 | "scripts": { 31 | "dev": "tsup --watch", 32 | "build": "rm -rf ./lib && tsup", 33 | "prepack": "yarn build", 34 | "start": "tsx ./src/main.mts", 35 | "test": "node --experimental-modules --loader tsx --test src/*.test.mts", 36 | "test:watch": "node --watch --loader tsx --test src/*.test.mts", 37 | "test:only": "node --watch --test-only --loader tsx --test src/*.test.mts" 38 | }, 39 | "dependencies": { 40 | "@ampproject/remapping": "^2.2.1", 41 | "@jridgewell/resolve-uri": "^3.1.1", 42 | "glob": "^10.3.3", 43 | "magic-string": "^0.30.3", 44 | "unplugin": "^1.4.0", 45 | "yargs": "^17.7.2" 46 | }, 47 | "devDependencies": { 48 | "@rollup/plugin-commonjs": "^25.0.4", 49 | "@rollup/plugin-node-resolve": "^15.2.1", 50 | "@rollup/plugin-replace": "^5.0.2", 51 | "@rspack/cli": "^0.3.2", 52 | "@rspack/core": "^0.3.1", 53 | "@types/node": "^20.5.7", 54 | "@types/yargs": "^17.0.24", 55 | "esbuild": "^0.19.2", 56 | "prettier": "^3.0.2", 57 | "react": "^18.2.0", 58 | "react-dom": "^18.2.0", 59 | "rollup": "^3.28.1", 60 | "tsup": "^7.2.0", 61 | "tsx": "^3.12.8", 62 | "typescript": "^5.2.2", 63 | "vite": "^4.4.9", 64 | "webpack": "^5.88.2" 65 | }, 66 | "files": [ 67 | "assets", 68 | "lib", 69 | "src" 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /src/main.mts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import yargs from "yargs"; 4 | import fs from "fs"; 5 | import path from "path"; 6 | import { log } from "console"; 7 | 8 | import { availableSourcemapDescriptors } from "./reactVersions.mjs"; 9 | import { loadSourcemap, maybeRewriteSourcemapWithReactProd } from "./index.mjs"; 10 | 11 | const argv = yargs 12 | .option("reactVersions", { 13 | alias: "rv", 14 | description: "Print available React versions", 15 | type: "boolean", 16 | }) 17 | .option("inputFile", { 18 | alias: "i", 19 | description: 20 | "Input sourcemap file path. If no output path is provided, the rewritten sourcemap will be written to the same directory with the same name, but with a `.remapped` suffix.", 21 | type: "string", 22 | }) 23 | .option("verbose", { 24 | alias: "v", 25 | description: "Run with verbose logging", 26 | type: "boolean", 27 | }) 28 | .help() 29 | .alias("help", "h") 30 | .parseSync(); 31 | 32 | function main() { 33 | if (argv.reactVersions) { 34 | log("Available React versions:", availableSourcemapDescriptors); 35 | return; 36 | } 37 | 38 | let inputFilePaths: string[] = []; 39 | 40 | if (argv.inputFile) { 41 | inputFilePaths.push(argv.inputFile); 42 | } 43 | 44 | if (inputFilePaths.length === 0) { 45 | throw new TypeError("No input file provided, got: " + argv.inputFile); 46 | } 47 | 48 | for (const inputFilePath of inputFilePaths) { 49 | const fullPath = path.resolve(inputFilePath); 50 | if (argv.verbose) { 51 | log("Processing file: ", fullPath); 52 | } 53 | const inputSourcemap = loadSourcemap(inputFilePath); 54 | const rewriteResult = maybeRewriteSourcemapWithReactProd(inputSourcemap, { 55 | verbose: argv.verbose, 56 | }); 57 | 58 | if (!rewriteResult.rewroteSourcemap) { 59 | if (argv.verbose) { 60 | log("No React version found in sourcemap, skipping"); 61 | } 62 | continue; 63 | } 64 | 65 | const outputFilePath = inputFilePath.replace(".js.map", ".remapped.js.map"); 66 | if (argv.verbose) { 67 | log("Writing output to: ", outputFilePath); 68 | } 69 | fs.writeFileSync(outputFilePath, JSON.stringify(rewriteResult.outputSourcemap, null, 2)); 70 | } 71 | } 72 | 73 | main(); 74 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | tmp/ 3 | 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lerna-debug.log* 11 | .pnpm-debug.log* 12 | 13 | # Diagnostic reports (https://nodejs.org/api/report.html) 14 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | *.lcov 28 | 29 | # nyc test coverage 30 | .nyc_output 31 | 32 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 33 | .grunt 34 | 35 | # Bower dependency directory (https://bower.io/) 36 | bower_components 37 | 38 | # node-waf configuration 39 | .lock-wscript 40 | 41 | # Compiled binary addons (https://nodejs.org/api/addons.html) 42 | build/Release 43 | 44 | # Dependency directories 45 | node_modules/ 46 | jspm_packages/ 47 | 48 | # Snowpack dependency directory (https://snowpack.dev/) 49 | web_modules/ 50 | 51 | # TypeScript cache 52 | *.tsbuildinfo 53 | 54 | # Optional npm cache directory 55 | .npm 56 | 57 | # Optional eslint cache 58 | .eslintcache 59 | 60 | # Optional stylelint cache 61 | .stylelintcache 62 | 63 | # Microbundle cache 64 | .rpt2_cache/ 65 | .rts2_cache_cjs/ 66 | .rts2_cache_es/ 67 | .rts2_cache_umd/ 68 | 69 | # Optional REPL history 70 | .node_repl_history 71 | 72 | # Output of 'npm pack' 73 | *.tgz 74 | 75 | # Yarn Integrity file 76 | .yarn-integrity 77 | 78 | # dotenv environment variable files 79 | .env 80 | .env.development.local 81 | .env.test.local 82 | .env.production.local 83 | .env.local 84 | 85 | # parcel-bundler cache (https://parceljs.org/) 86 | .cache 87 | .parcel-cache 88 | 89 | # Next.js build output 90 | .next 91 | out 92 | 93 | # Nuxt.js build / generate output 94 | .nuxt 95 | dist 96 | 97 | # Gatsby files 98 | .cache/ 99 | # Comment in the public line in if your project uses Gatsby and not Next.js 100 | # https://nextjs.org/blog/next-9-1#public-directory-support 101 | # public 102 | 103 | # vuepress build output 104 | .vuepress/dist 105 | 106 | # vuepress v2.x temp and cache directory 107 | .temp 108 | .cache 109 | 110 | # Docusaurus cache and generated files 111 | .docusaurus 112 | 113 | # Serverless directories 114 | .serverless/ 115 | 116 | # FuseBox cache 117 | .fusebox/ 118 | 119 | # DynamoDB Local files 120 | .dynamodb/ 121 | 122 | # TernJS port file 123 | .tern-port 124 | 125 | # Stores VSCode versions used for testing VSCode extensions 126 | .vscode-test 127 | 128 | # yarn v2 129 | .yarn/cache 130 | .yarn/unplugged 131 | .yarn/build-state.yml 132 | .yarn/install-state.gz 133 | .pnp.* 134 | 135 | 136 | builds/ -------------------------------------------------------------------------------- /src/reactVersions.mts: -------------------------------------------------------------------------------- 1 | export interface ReactVersion { 2 | version: string; 3 | package: string; 4 | contentHash: string; 5 | filename: string; 6 | } 7 | 8 | export const availableSourcemapDescriptors: ReactVersion[] = [ 9 | // 0.0.0-experimental-953cb02f6-20230907 10 | { 11 | version: "0.0.0-experimental-953cb02f6-20230907", 12 | package: "react-dom", 13 | filename: "react-dom.production.min.js", 14 | contentHash: "4cd441458e2535562a74651cbcd02d7c2e1f163e364aca608d3c5b00448e1442", 15 | }, 16 | // 17.0.2 17 | { 18 | version: "17.0.2", 19 | package: "react", 20 | filename: "react.production.min.js", 21 | contentHash: "d3ea88ce03534dc2f3060f4ca55f26dfa26466b2077f61ff401fba2529567254", 22 | }, 23 | { 24 | version: "17.0.2", 25 | package: "react-dom", 26 | filename: "react-dom.production.min.js", 27 | contentHash: "aa5e027a236b156f5e833ae8a86e94474130b78f0b70386c1b213417d0013910", 28 | }, 29 | { 30 | version: "17.0.2", 31 | package: "react-dom", 32 | filename: "react-dom.profiling.min.js", 33 | contentHash: "c6d18f6f0b8479f2552da042d37e3b70bb4859251bc05e7bd3e9b100d68f2a30", 34 | }, 35 | // 18.1.0 36 | { 37 | version: "18.1.0", 38 | package: "react", 39 | filename: "react.production.min.js", 40 | contentHash: "5350b7eb5e15e518dd4f0105d7ab04ce2c97169a3e11690d13364aae0bf8b98f", 41 | }, 42 | { 43 | version: "18.1.0", 44 | package: "react-dom", 45 | filename: "react-dom.production.min.js", 46 | contentHash: "db70122e66c434e360539319ef318959f303a8792417e3cbb14abb6e56294191", 47 | }, 48 | { 49 | version: "18.1.0", 50 | package: "react-dom", 51 | filename: "react-dom.profiling.min.js", 52 | contentHash: "115a2baefc4c008bc89cab1062457dfb4944efd7b841fd4d44016efe0bd5a95f", 53 | }, 54 | // 18.2.0 55 | { 56 | version: "18.2.0", 57 | package: "react", 58 | filename: "react.production.min.js", 59 | contentHash: "12a71800adb60f93da6dfe5d40ebdf225101204dd51f5e7266cce243aefd6512", 60 | }, 61 | { 62 | version: "18.2.0", 63 | package: "react", 64 | filename: "react-jsx-runtime.production.min.js", 65 | contentHash: "76e3364c46895ed2c4a8d5cc332e5e4ef31d6f732d35b1e56826dc5895245452", 66 | }, 67 | { 68 | version: "18.2.0", 69 | package: "react-dom", 70 | filename: "react-dom.production.min.js", 71 | contentHash: "1404cd9fd1e2ee3ce79fba01957b01c83f88ccd86a3e55e6a51a871d9fe05552", 72 | }, 73 | { 74 | version: "18.2.0", 75 | package: "react-dom", 76 | filename: "react-dom.profiling.min.js", 77 | contentHash: "81f4765156d0468929630c316276e0d7e5ec7940fde7d10380dd2d9b889327b5", 78 | }, 79 | // 18.3.1 80 | { 81 | version: "18.3.1", 82 | package: "react", 83 | filename: "react.production.min.js", 84 | contentHash: "4b35e378f469c4f492c7514bb106b5833746dbbae80496bd4aa9acc6e9ac4b42", 85 | }, 86 | { 87 | version: "18.3.1", 88 | package: "react", 89 | filename: "react-jsx-runtime.production.min.js", 90 | contentHash: "76e3364c46895ed2c4a8d5cc332e5e4ef31d6f732d35b1e56826dc5895245452", 91 | }, 92 | { 93 | version: "18.3.1", 94 | package: "react-dom", 95 | filename: "react-dom.production.min.js", 96 | contentHash: "cbf7fe6b9726ee65f8bcd5715289cc5161c8dacf74d0b8aaa0d29412516f5f47", 97 | }, 98 | { 99 | version: "18.3.1", 100 | package: "react-dom", 101 | filename: "react-dom.profiling.min.js", 102 | contentHash: "962c027be962261c45af4751cf219743e0537344db987d9aa89cbe3c8be3d36d", 103 | }, 104 | ]; 105 | 106 | export const hashesToSourcemapDescriptors: Record = {}; 107 | 108 | for (const descriptor of availableSourcemapDescriptors) { 109 | hashesToSourcemapDescriptors[descriptor.contentHash] = descriptor; 110 | } 111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-prod-sourcemaps 2 | 3 | A tool to update app sourcemaps with the original code of ReactDOM's production builds . 4 | 5 | ## Background 6 | 7 | React has never shipped sourcemaps for any of its production build artifacts. This makes it impossible to meaningfully debug errors inside of React in production. React's source code is already hard to understand in its original form - trying figure out what's happening when all you have is single-character variable names and no comments is _impossible_. 8 | 9 | In 2023 I filed a React PR at https://github.com/facebook/react/pull/26446 that updated React's build pipeline to generate sourcemaps for production artifacts. It was eventually merged, but then later reverted. Instead, React 19 will ship with optimized but unminified prod artifacts. That means that app build steps will minify React's prod artifacts themselves, and thus React's source will be debuggable. 10 | 11 | However, that doesn't help debug _current_ versions of React. 12 | 13 | I've done the work to check out the tagged source code for earlier React versions, rebuilt those versions locally, and verified that the artifacts are byte-for-byte identical. I've then backported the build pipeline changes from my PR onto those older checked-out versions, and built the sourcemaps that _would_ have been generated for each version. 14 | 15 | The actual build changes used can be seen here: 16 | 17 | - https://github.com/facebook/react/compare/v18.2.0...replayio:react:feature/react-sourcemaps-18.2.0 18 | 19 | ## Contents 20 | 21 | This package includes: 22 | 23 | - the actual sourcemaps 24 | - logic to search an input sourcemap for specific React and ReactDOM prod artifacts by content hash and replace them with the "original" pre-minified bundle source via the sourcemaps 25 | - a CLI tool that will load a given input sourcemap file and rewrite it 26 | - a build tool plugin that will automatically replace React package sourcemaps found in the app bundle 27 | 28 | ### React Versions 29 | 30 | This package currently includes sourcemaps for React and ReactDOM for these versions: 31 | 32 | - 18.3.1 33 | - 18.2.0 34 | - 18.1.0 35 | - 17.0.2 36 | 37 | ## CLI Usage 38 | 39 | ```bash 40 | yarn add @acemarke/react-prod-sourcemaps 41 | ./node_modules/.bin/react-prod-sourcemaps --inputFile path/to/your/appBuild/sourcemap.js.map 42 | # Output file will currently be written to sourcemap.remapped.js.map 43 | ``` 44 | 45 | ## Build plugin usage 46 | 47 | The build plugin is built using [unplugin](https://github.com/unjs/unplugin), meaning we currently supports webpack, esbuild, rollup, vite and rspack (experimental). 48 | 49 | The plugin supports the following options: 50 | 51 | | key | value | required | default | recommended | functionality | 52 | | -------- | -------- | -------- | --------- | ----------- | ------------------------------------------------------------------------------------------------------------------- | 53 | | debug | boolean | no | false | false | enables debug logging | 54 | | preserve | boolean | no | false | false | preserves original sourcemaps and outputs remapped sourcemaps under path/to/output/sourcemap/[name].js.remapped.map | 55 | | mode | "strict" | no | undefined | "strict" | causes the build plugin to throw an error if no sourcemap files are generated by the build tool | 56 | 57 | > **_Warning_**: if sourcemap generation is not enabled by your build tool (or if it is not setup correctly), the plugin will silently fail and not perform any sourcemap remapping. We recommend setting using mode: "strict" in case you want the plugin to error in that case. 58 | 59 | Webpack: 60 | 61 | ```javascript 62 | import { WebpackReactSourcemapsPlugin } from "@acemarke/react-prod-sourcemaps"; 63 | 64 | module.exports = { 65 | // ...webpack config 66 | devtool: "source-map", // or any other option that generates separate .map.js files 67 | plugins: [WebpackReactSourcemapsPlugin({ debug: false, preserve: false })], 68 | }; 69 | ``` 70 | 71 | esbuild: 72 | 73 | ```javascript 74 | import { EsbuildReactSourcemapsPlugin } from "@acemarke/react-prod-sourcemaps"; 75 | 76 | esbuild.build({ 77 | // ...esbuild config 78 | sourcemap: true, // or any other option that generates separate .map.js files 79 | plugins: [EsbuildReactSourcemapsPlugin({ debug: false, preserve: false })], 80 | }); 81 | ``` 82 | 83 | Rollup: 84 | 85 | ```javascript 86 | import { RollupReactSourcemapsPlugin } from "@acemarke/react-prod-sourcemaps"; 87 | 88 | rollup({ 89 | // ...rollup config 90 | output: { 91 | sourcemap: true, // or any other option that generates separate .map.js files 92 | }, 93 | plugins: [RollupReactSourcemapsPlugin({ debug: false, preserve: false })], 94 | }); 95 | ``` 96 | 97 | Vite: 98 | 99 | ```javascript 100 | import { ViteReactSourcemapsPlugin } from "@acemarke/react-prod-sourcemaps"; 101 | 102 | vite.build({ 103 | // ...vite config 104 | build: { 105 | sourcemap: true, // or any other option that generates separate .map.js files 106 | }, 107 | plugins: [ViteReactSourcemapsPlugin({ debug: false, preserve: false })], 108 | }); 109 | ``` 110 | 111 | ## Future Plans 112 | 113 | - Add sourcemaps for more React versions 114 | - Add more options to the CLI tool: 115 | - Glob sourcemaps in a folder 116 | - Overwrite original sourcemap paths 117 | -------------------------------------------------------------------------------- /assets/react/18.2.0/react-jsx-runtime.production.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"react-jsx-runtime.production.min.js","mappings":";;;;;;;;;aAEA,IAAIA,EAAQC,OAAA,CAAQ,OAAR,CAAZ,CAMMC,EAAqBC,MAAAC,IAAA,CAAW,eAAX,CAN3B,CAOMC,EAAsBF,MAAAC,IAAA,CAAW,gBAAX,CAP5B,CAaME,EAAiBC,MAAAC,UAAAF,eAbvB,CAiBMG,EARuBT,CAAAU,mDAQHD,kBAjB1B,CAkBME,EAAiB,CACrBC,IAAK,EADgB,CAErBC,IAAK,EAFgB,CAGrBC,OAAQ,EAHa,CAIrBC,SAAU,EAJW,CA6DvBC;QAASA,EAAG,CAACC,CAAD,CAAOC,CAAP,CAAeC,CAAf,CAAyB,CACnC,IAAIC,CAAJ,CAEMC,EAAQ,EAFd,CAGIT,EAAM,IAHV,CAIIC,EAAM,IAOOS,OAAjB,GAAIH,CAAJ,GAEEP,CAFF,CAEQ,EAFR,CAEaO,CAFb,CA3DsBG,OAgEtB,GAAgBJ,CAhETN,IAgEP,GAEEA,CAFF,CAEQ,EAFR,CAEaM,CAAAN,IAFb,CArEsBU,OA0EtB,GAAgBJ,CA1ETL,IA0EP,GACEA,CADF,CACQK,CAAAL,IADR,CAKA,KAAKO,CAAL,GAAiBF,EAAjB,CACMZ,CAAAiB,KAAA,CAAoBL,CAApB,CAA4BE,CAA5B,CAAJ,EAA6C,CAACT,CAAAL,eAAA,CAA8Bc,CAA9B,CAA9C,GACEC,CAAA,CAAMD,CAAN,CADF,CACoBF,CAAA,CAAOE,CAAP,CADpB,CAMF,IAAIH,CAAJ,EAAYA,CAAAO,aAAZ,CAGE,IAAKJ,CAAL,GAFMI,EAEWA,CAFIP,CAAAO,aAEJA,EAAjB,CAC0BF,MAAxB,GAAID,CAAA,CAAMD,CAAN,CAAJ,GACEC,CAAA,CAAMD,CAAN,CADF,CACoBI,CAAA,CAAaJ,CAAb,CADpB,CAMJ,OAlEgBK,CAEdC,SAAUxB,CAFIuB,CAIdR,KA8DkBA,CAlEJQ,CAKdb,IA6DwBA,CAlEVa,CAMdZ,IA4D6BA,CAlEfY,CAOdJ,MA2DmFA,CAlErEI,CASdE,OAyDwDlB,CAAAmB,QAlE1CH,CAsBmB,CA6DrCI,OAAAC,SAAA,CAAmBzB,CACnBwB,QAAAb,IAAA,CAAce,CACdF,QAAAG,KAAA,CAAeA","names":["React","require","REACT_ELEMENT_TYPE","Symbol","for","REACT_FRAGMENT_TYPE","hasOwnProperty","Object","prototype","ReactCurrentOwner","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","RESERVED_PROPS","key","ref","__self","__source","jsx","type","config","maybeKey","propName","props","undefined","call","defaultProps","element","$$typeof","_owner","current","exports","Fragment","jsx$1","jsxs"],"sources":["react-jsx-runtime.production.js"],"sourcesContent":["'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nconst REACT_ELEMENT_TYPE = Symbol.for('react.element');\nconst REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\n\nconst ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nconst ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconst ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nconst ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nconst RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nfunction hasValidRef(config) {\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n\n return config.key !== undefined;\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nconst ReactElement = function (type, key, ref, self, source, owner, props) {\n const element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\n\nfunction jsx(type, config, maybeKey) {\n let propName; // Reserved names are extracted\n\n const props = {};\n let key = null;\n let ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n const defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return ReactElement(type, key, ref, undefined, undefined, ReactCurrentOwner.current, props);\n}\n\n/**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\nconst ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nconst ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nconst jsx$1 = jsx; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nconst jsxs = jsx;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx$1;\nexports.jsxs = jsxs;"]} -------------------------------------------------------------------------------- /assets/react/18.3.1/react-jsx-runtime.production.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"react-jsx-runtime.production.min.js","mappings":";;;;;;;;;aAEA,IAAIA,EAAQC,OAAA,CAAQ,OAAR,CAAZ,CAMMC,EAAqBC,MAAAC,IAAA,CAAW,eAAX,CAN3B,CAOMC,EAAsBF,MAAAC,IAAA,CAAW,gBAAX,CAP5B,CAaME,EAAiBC,MAAAC,UAAAF,eAbvB,CAiBMG,EARuBT,CAAAU,mDAQHD,kBAjB1B,CAkBME,EAAiB,CACrBC,IAAK,EADgB,CAErBC,IAAK,EAFgB,CAGrBC,OAAQ,EAHa,CAIrBC,SAAU,EAJW,CA6DvBC;QAASA,EAAG,CAACC,CAAD,CAAOC,CAAP,CAAeC,CAAf,CAAyB,CACnC,IAAIC,CAAJ,CAEMC,EAAQ,EAFd,CAGIT,EAAM,IAHV,CAIIC,EAAM,IAOOS,OAAjB,GAAIH,CAAJ,GAEEP,CAFF,CAEQ,EAFR,CAEaO,CAFb,CA3DsBG,OAgEtB,GAAgBJ,CAhETN,IAgEP,GAEEA,CAFF,CAEQ,EAFR,CAEaM,CAAAN,IAFb,CArEsBU,OA0EtB,GAAgBJ,CA1ETL,IA0EP,GACEA,CADF,CACQK,CAAAL,IADR,CAKA,KAAKO,CAAL,GAAiBF,EAAjB,CACMZ,CAAAiB,KAAA,CAAoBL,CAApB,CAA4BE,CAA5B,CAAJ,EAA6C,CAACT,CAAAL,eAAA,CAA8Bc,CAA9B,CAA9C,GACEC,CAAA,CAAMD,CAAN,CADF,CACoBF,CAAA,CAAOE,CAAP,CADpB,CAMF,IAAIH,CAAJ,EAAYA,CAAAO,aAAZ,CAGE,IAAKJ,CAAL,GAFMI,EAEWA,CAFIP,CAAAO,aAEJA,EAAjB,CAC0BF,MAAxB,GAAID,CAAA,CAAMD,CAAN,CAAJ,GACEC,CAAA,CAAMD,CAAN,CADF,CACoBI,CAAA,CAAaJ,CAAb,CADpB,CAMJ,OAlEgBK,CAEdC,SAAUxB,CAFIuB,CAIdR,KA8DkBA,CAlEJQ,CAKdb,IA6DwBA,CAlEVa,CAMdZ,IA4D6BA,CAlEfY,CAOdJ,MA2DmFA,CAlErEI,CASdE,OAyDwDlB,CAAAmB,QAlE1CH,CAsBmB,CA6DrCI,OAAAC,SAAA,CAAmBzB,CACnBwB,QAAAb,IAAA,CAAce,CACdF,QAAAG,KAAA,CAAeA","names":["React","require","REACT_ELEMENT_TYPE","Symbol","for","REACT_FRAGMENT_TYPE","hasOwnProperty","Object","prototype","ReactCurrentOwner","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","RESERVED_PROPS","key","ref","__self","__source","jsx","type","config","maybeKey","propName","props","undefined","call","defaultProps","element","$$typeof","_owner","current","exports","Fragment","jsx$1","jsxs"],"sources":["react-jsx-runtime.production.js"],"sourcesContent":["'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nconst REACT_ELEMENT_TYPE = Symbol.for('react.element');\nconst REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\n\nconst ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nconst ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconst ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nconst ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nconst RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nfunction hasValidRef(config) {\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n\n return config.key !== undefined;\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nconst ReactElement = function (type, key, ref, self, source, owner, props) {\n const element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\n\nfunction jsx(type, config, maybeKey) {\n let propName; // Reserved names are extracted\n\n const props = {};\n let key = null;\n let ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n const defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return ReactElement(type, key, ref, undefined, undefined, ReactCurrentOwner.current, props);\n}\n\n/**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\nconst ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nconst ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nconst jsx$1 = jsx; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nconst jsxs = jsx;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx$1;\nexports.jsxs = jsxs;"]} -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 4 | 5 | /* Basic Options */ 6 | // "incremental": true, /* Enable incremental compilation */ 7 | "target": "es2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, 8 | "module": "ESNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, 9 | // "lib": [], /* Specify library files to be included in the compilation. */ 10 | // "allowJs": true, /* Allow javascript files to be compiled. */ 11 | // "checkJs": true, /* Report errors in .js files. */ 12 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 13 | // "declaration": true /* Generates corresponding '.d.ts' file. */, 14 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 15 | "sourceMap": true /* Generates corresponding '.map' file. */, 16 | // "outFile": "./", /* Concatenate and emit output to single file. */ 17 | "outDir": "lib" /* Redirect output structure to the directory. */, 18 | "rootDir": "src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, 19 | // "composite": true, /* Enable project compilation */ 20 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 21 | // "removeComments": true, /* Do not emit comments to output. */ 22 | // "noEmit": true, /* Do not emit outputs. */ 23 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 24 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 26 | 27 | /* Strict Type-Checking Options */ 28 | "strict": true /* Enable all strict type-checking options. */, 29 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 30 | // "strictNullChecks": true, /* Enable strict null checks. */ 31 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 32 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 33 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 34 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 35 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 36 | 37 | /* Additional Checks */ 38 | "noUnusedLocals": false /* Report errors on unused locals. */, 39 | "resolveJsonModule": true, 40 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 41 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 42 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 43 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 44 | 45 | /* Module Resolution Options */ 46 | "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, 47 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 48 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 49 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 50 | // "typeRoots": [], /* List of folders to include type definitions from. */ 51 | "types": ["node"] /* Type declaration files to be included in compilation. */, 52 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 53 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, 54 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 55 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 56 | 57 | /* Source Map Options */ 58 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 60 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 61 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 62 | 63 | /* Experimental Options */ 64 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 65 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 66 | 67 | /* Advanced Options */ 68 | "skipLibCheck": true /* Skip type checking of declaration files. */, 69 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 70 | }, 71 | "include": ["src/**/*"], 72 | "exclude": ["test", "lib", "src/**.test.ts"] 73 | } 74 | -------------------------------------------------------------------------------- /src/build-plugin.mts: -------------------------------------------------------------------------------- 1 | import * as fs from "node:fs"; 2 | import * as path from "node:path"; 3 | import { log, error } from "node:console"; 4 | import { createUnplugin } from "unplugin"; 5 | 6 | import { maybeRewriteSourcemapWithReactProd, loadSourcemap } from "./index.mjs"; 7 | 8 | export interface ReactSourcemapsPluginOptions { 9 | debug?: boolean; 10 | preserve?: boolean; 11 | mode?: "strict"; 12 | } 13 | 14 | const PLUGIN_NAME = "react-sourcemaps"; 15 | // Iterates over the list of generated assets, skips any that are not sourcemaps 16 | // and attempts to rewrite them with React production sourcemaps. 17 | function rewireSourceMapsFromGeneratedAssetList( 18 | generatedAssets: string[], 19 | options: ReactSourcemapsPluginOptions 20 | ) { 21 | if (!generatedAssets.length) { 22 | log( 23 | "ReactSourceMaps: Bundle did not generate any assets? This might be a bug with react-sourcemaps plugin or an issue with your build tool" 24 | ); 25 | return; 26 | } 27 | 28 | const stats = { 29 | generatedSourceMaps: 0, 30 | skippedSourceMaps: 0, 31 | }; 32 | 33 | for (let i = 0; i < generatedAssets.length; i++) { 34 | const file = generatedAssets[i]; 35 | if (!file.endsWith(".map")) continue; 36 | 37 | stats.generatedSourceMaps++; 38 | 39 | const rewriteResult = maybeRewriteSourcemapWithReactProd(loadSourcemap(file), { 40 | verbose: options.debug, 41 | }); 42 | 43 | if (!rewriteResult.rewroteSourcemap) { 44 | stats.skippedSourceMaps++; 45 | if (options.debug) { 46 | log("ReactSourceMaps: ❓ No React version found in sourcemap, skipping", file); 47 | } 48 | continue; 49 | } 50 | if (options.debug) { 51 | log("ReactSourceMaps: ✅ Remapped react sourcemaps for ", file, "writing to disk..."); 52 | } 53 | 54 | if (!options.preserve) { 55 | // WriteFileSync overwrites the file by default 56 | fs.writeFileSync(file, JSON.stringify(rewriteResult.outputSourcemap, null, 2)); 57 | continue; 58 | } 59 | 60 | const remappedFile = file.replace(/\.map$/, ".remapped.map"); 61 | fs.writeFileSync(remappedFile, JSON.stringify(rewriteResult.outputSourcemap, null, 2)); 62 | if (options.debug) { 63 | log("ReactSourceMaps: Remapped sourcemap written to ", remappedFile); 64 | } 65 | } 66 | 67 | if (options.debug) { 68 | log( 69 | "ReactSourceMaps: Found a total of ", 70 | stats.generatedSourceMaps, 71 | " sourcemap files, remapped", 72 | stats.generatedSourceMaps - stats.skippedSourceMaps, 73 | " sourcemaps and skipped ", 74 | stats.skippedSourceMaps, 75 | " sourcemaps." 76 | ); 77 | } 78 | if (options.mode === "strict" && stats.generatedSourceMaps === 0) { 79 | throw new Error( 80 | "ReactSourceMaps: ❌ No sourcemaps found in bundle. This is either a bug with react-sourcemaps plugin or an issue with your build tool. Please verify that your build system is generating sourcemaps before filing an issue with react-prod-sourcemaps." 81 | ); 82 | } 83 | 84 | if (options.mode === "strict" && stats.generatedSourceMaps - stats.skippedSourceMaps === 0) { 85 | throw new Error( 86 | "ReactSourceMaps: ❌ No react sourcemaps found in bundle, nothing was updated! This is either a bug with react-sourcemaps plugin or an issue with your build tool. Please verify that your build system is generating sourcemaps before filing an issue with react-prod-sourcemaps." 87 | ); 88 | } 89 | } 90 | 91 | const unplugin = createUnplugin( 92 | (pluginOptions: ReactSourcemapsPluginOptions = { debug: false, preserve: false }) => { 93 | return { 94 | name: PLUGIN_NAME, 95 | vite: { 96 | writeBundle(outputOptions, bundle) { 97 | // @TODO: we probably need a better heuristic than to fallback to path.resolve 98 | const outputPath = outputOptions.dir ?? path.resolve(); 99 | const assets = Object.keys(bundle).map(asset => path.join(outputPath, asset)); 100 | rewireSourceMapsFromGeneratedAssetList(assets, pluginOptions); 101 | }, 102 | }, 103 | rollup: { 104 | writeBundle(outputOptions, bundle) { 105 | // @TODO: we probably need a better heuristic than to fallback to path.resolve 106 | const outputPath = outputOptions.dir ?? path.resolve(); 107 | const assets = Object.keys(bundle).map(asset => path.join(outputPath, asset)); 108 | rewireSourceMapsFromGeneratedAssetList(assets, pluginOptions); 109 | }, 110 | }, 111 | webpack(compiler) { 112 | compiler.hooks.afterEmit.tap(PLUGIN_NAME, compilation => { 113 | // @TODO: we probably need a better heuristic than to fallback to path.resolve 114 | const outputPath = compilation.outputOptions.path ?? path.resolve(); 115 | const assets = Object.keys(compilation.assets).map(asset => path.join(outputPath, asset)); 116 | rewireSourceMapsFromGeneratedAssetList(assets, pluginOptions); 117 | }); 118 | }, 119 | rspack(compiler) { 120 | compiler.hooks.afterEmit.tap(PLUGIN_NAME, compilation => { 121 | // @TODO: we probably need a better heuristic than to fallback to path.resolve 122 | const outputPath = compilation.outputOptions.path ?? path.resolve(); 123 | const assets = Object.keys(compilation.assets).map(asset => path.join(outputPath, asset)); 124 | rewireSourceMapsFromGeneratedAssetList(assets, pluginOptions); 125 | }); 126 | }, 127 | esbuild: { 128 | setup(build) { 129 | // Metafile is required in order for us to get a list of 130 | // generated assets, see https://esbuild.github.io/api/#metafile 131 | build.initialOptions.metafile = true; 132 | 133 | // in debug, throw an error if sourcemap option is not set 134 | if (!build.initialOptions.sourcemap && pluginOptions.debug) { 135 | error( 136 | "ReactSourceMaps: ❌ sourcemap option is required in order for react-sourcemaps to work with esbuild." 137 | ); 138 | } 139 | // https://esbuild.github.io/plugins/#on-end 140 | build.onEnd(result => { 141 | // If a build errors, then noop 142 | if (result.errors.length) { 143 | if (pluginOptions.debug) { 144 | log("ReactSourceMaps: ❌ build errored, skipping sourcemap rewrite..."); 145 | } 146 | return; 147 | } 148 | if (!result.metafile) { 149 | throw new Error( 150 | "ReactSourceMaps: ❌ failed to remap, esbuild result does not include a metafile. This is required for react sourcemaps plugin to work." 151 | ); 152 | } 153 | 154 | rewireSourceMapsFromGeneratedAssetList( 155 | Object.keys(result.metafile.outputs), 156 | pluginOptions 157 | ); 158 | }); 159 | }, 160 | }, 161 | }; 162 | } 163 | ); 164 | 165 | export const ViteReactSourcemapsPlugin = unplugin.vite; 166 | export const RollupReactSourcemapsPlugin = unplugin.rollup; 167 | export const WebpackReactSourcemapsPlugin = unplugin.webpack; 168 | export const RspackReactSourcemapsPlugin = unplugin.rspack; 169 | export const EsbuildReactSourcemapsPlugin = unplugin.esbuild; 170 | -------------------------------------------------------------------------------- /src/index.mts: -------------------------------------------------------------------------------- 1 | import remapping from "@ampproject/remapping"; 2 | import fs from "fs"; 3 | import path from "path"; 4 | import { fileURLToPath } from "url"; 5 | import { log } from "console"; 6 | import { createHash } from "node:crypto"; 7 | import { SourceMapInput } from "@jridgewell/trace-mapping"; 8 | import resolveUri from "@jridgewell/resolve-uri"; 9 | 10 | import * as BuildPlugins from "./build-plugin.mjs"; 11 | import { ReactVersion, hashesToSourcemapDescriptors } from "./reactVersions.mjs"; 12 | 13 | export interface ReactProdSourcemapsOptions { 14 | verbose?: boolean; 15 | errorOnMissingVersions?: boolean; 16 | } 17 | 18 | function getDirname() { 19 | if (typeof __dirname !== "undefined") { 20 | return __dirname; 21 | } 22 | return fileURLToPath(new URL(".", import.meta.url)); 23 | } 24 | 25 | // Borrowed from `trace-mapping` internals 26 | function resolve(input: string, base: string | undefined): string { 27 | // The base is always treated as a directory, if it's not empty. 28 | // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 29 | // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 30 | if (base && !base.endsWith("/")) base += "/"; 31 | 32 | return resolveUri(input, base); 33 | } 34 | 35 | // Copied from: 36 | // https://github.com/jridgewell/trace-mapping/blob/5ccfcfeeee9dfa3b13567bb0f95260ea32f2c269/src/types.ts#L4 37 | export interface SourceMapV3 { 38 | file?: string | null; 39 | names: string[]; 40 | sourceRoot?: string; 41 | sources: (string | null)[]; 42 | sourcesContent?: (string | null)[]; 43 | version: 3; 44 | } 45 | 46 | function hashSHA256(data: string): string { 47 | return createHash("sha256").update(data).digest("hex"); 48 | } 49 | 50 | export function isSourceMapV3(map: any): map is SourceMapV3 { 51 | return ( 52 | typeof map === "object" && 53 | map !== null && 54 | map.version === 3 && 55 | "names" in map && 56 | "sources" in map 57 | ); 58 | } 59 | 60 | export function loadSourcemap(filePath: string): SourceMapV3 { 61 | if (!fs.existsSync(filePath)) { 62 | throw new Error(`Cannot find ${filePath}`); 63 | } 64 | 65 | const maybeSourcemap = JSON.parse(fs.readFileSync(filePath, "utf-8")); 66 | if (!isSourceMapV3(maybeSourcemap)) { 67 | throw new Error(`Invalid sourcemap: ${filePath}`); 68 | } 69 | 70 | return maybeSourcemap; 71 | } 72 | 73 | function loadExistingSourcemap( 74 | versionEntry: ReactVersion, 75 | options: ReactProdSourcemapsOptions 76 | ): SourceMapV3 { 77 | const filename = versionEntry.filename + ".map"; 78 | const filePath = path.join( 79 | getDirname(), 80 | "../assets", 81 | versionEntry.package, 82 | versionEntry.version, 83 | filename 84 | ); 85 | 86 | if (options.verbose) { 87 | log("Loading sourcemap from: ", filePath); 88 | } 89 | 90 | return loadSourcemap(filePath); 91 | } 92 | 93 | function findMatchingReactVersion( 94 | reactArtifactFilename: string, 95 | inputSourcemap: SourceMapV3, 96 | options: ReactProdSourcemapsOptions 97 | ): ReactVersion { 98 | let filenameIndex = inputSourcemap.sources.indexOf(reactArtifactFilename); 99 | if (filenameIndex === -1) { 100 | // Try one more time. Maybe the path had extra segments in it, like: 101 | // "webpack://_N_E/./node_modules/react-dom/cjs/react-dom.production.min.js" 102 | filenameIndex = inputSourcemap.sources.findIndex(filename => { 103 | if (!filename) return false; 104 | // Use the same resolve logic as `remapping` to normalize the path 105 | const normalizedPath = resolve(filename, ""); 106 | return normalizedPath === reactArtifactFilename; 107 | }); 108 | } 109 | 110 | if (filenameIndex === -1) { 111 | throw new Error(`Cannot find '${reactArtifactFilename}' in input sourcemap`); 112 | } 113 | 114 | const sourceContents = inputSourcemap.sourcesContent?.[filenameIndex]; 115 | if (!sourceContents) { 116 | const message = `Cannot find source contents for '${reactArtifactFilename}'`; 117 | if (options.verbose) { 118 | log(message); 119 | } 120 | throw new Error(message); 121 | } 122 | 123 | const contentHash = hashSHA256(sourceContents); 124 | const versionEntry = hashesToSourcemapDescriptors[contentHash]; 125 | 126 | if (!versionEntry) { 127 | const reactInternalVersionRegex = /version:\"\d+\.\d+\.\d+.*?"/; 128 | const reactInternalVersionMatch = reactInternalVersionRegex.exec(sourceContents); 129 | const reactVersion = reactInternalVersionMatch?.groups?.version ?? "unknown"; 130 | const message = `Cannot find version for '${reactArtifactFilename}' (found: ${reactVersion})`; 131 | if (options.verbose) { 132 | log(message); 133 | } 134 | if (options.errorOnMissingVersions) { 135 | throw new Error(message); 136 | } 137 | } 138 | 139 | return versionEntry; 140 | } 141 | 142 | interface RewriteSourcemapResult { 143 | outputSourcemap: SourceMapV3; 144 | rewroteSourcemap: boolean; 145 | reactVersions: ReactVersion[] | null; 146 | } 147 | 148 | // Rougly, the operation performed here is: 149 | // - Find an appropriate minified file listed in our sourcemap's contents 150 | // - Find the version of React that matches the contents of that file 151 | // - Load the original sourcemap for that version of React 152 | // - Swap them out by rewriting the sourcemap 153 | const SUPPORTED_PACKAGES = 154 | /(react-dom\.profiling\.min\.js|react-dom\.production\.min\.js|react(-jsx-runtime)*\.production\.min\.js)/; 155 | 156 | export function maybeRewriteSourcemapWithReactProd( 157 | inputSourcemap: SourceMapV3, 158 | options: ReactProdSourcemapsOptions = { verbose: false, errorOnMissingVersions: false } 159 | ): RewriteSourcemapResult { 160 | const isValidSourcemap = isSourceMapV3(inputSourcemap); 161 | if (!isValidSourcemap) { 162 | throw new Error("Invalid sourcemap"); 163 | } 164 | 165 | const reactVersions: ReactVersion[] = []; 166 | 167 | const remapped = remapping(inputSourcemap as SourceMapInput, (file, ctx) => { 168 | const matchedPackage = SUPPORTED_PACKAGES.exec(ctx.source); 169 | if (matchedPackage === null) { 170 | if (options.verbose) { 171 | log(`Skipping sourcemap ${file} because it does not contain a sourcemap for remapping`); 172 | } 173 | return null; 174 | } 175 | 176 | if (options.verbose) log(`Found ${matchedPackage} in file:`, ctx); 177 | 178 | const versionEntry: ReactVersion | null = findMatchingReactVersion( 179 | file, 180 | inputSourcemap, 181 | options 182 | ); 183 | if (!versionEntry) { 184 | if (options.verbose) { 185 | log( 186 | `Could not resolve sourcemaps for ${matchedPackage} version. Please file an issue with react-prod-sourcemaps.` 187 | ); 188 | } 189 | return null; 190 | } 191 | 192 | reactVersions.push(versionEntry); 193 | if (options.verbose) 194 | log(`✅ Found matching version for ${matchedPackage[0]}:`, versionEntry.version); 195 | 196 | const sourcemap = loadExistingSourcemap(versionEntry, options); 197 | 198 | if (!sourcemap || !isSourceMapV3(sourcemap)) { 199 | throw new Error( 200 | `Failed to load expected sourcemap for ${matchedPackage[0]} version ${versionEntry.version}` 201 | ); 202 | } 203 | 204 | return sourcemap as SourceMapInput; 205 | }); 206 | 207 | if (reactVersions.length && options.verbose) { 208 | log("Found React entries:", reactVersions); 209 | } 210 | 211 | return { 212 | outputSourcemap: remapped, 213 | rewroteSourcemap: reactVersions.length > 0, 214 | reactVersions: reactVersions.length > 0 ? reactVersions : null, 215 | }; 216 | } 217 | 218 | export type { ReactSourcemapsPluginOptions } from "./build-plugin.mjs"; 219 | export const ViteReactSourcemapsPlugin = BuildPlugins.ViteReactSourcemapsPlugin; 220 | export const RollupReactSourcemapsPlugin = BuildPlugins.RollupReactSourcemapsPlugin; 221 | export const WebpackReactSourcemapsPlugin = BuildPlugins.WebpackReactSourcemapsPlugin; 222 | export const RspackReactSourcemapsPlugin = BuildPlugins.RspackReactSourcemapsPlugin; 223 | export const EsbuildReactSourcemapsPlugin = BuildPlugins.EsbuildReactSourcemapsPlugin; 224 | -------------------------------------------------------------------------------- /src/build-plugin.test.mts: -------------------------------------------------------------------------------- 1 | import fs from "node:fs"; 2 | import test from "node:test"; 3 | import path from "node:path"; 4 | import url from "node:url"; 5 | import assert from "node:assert"; 6 | import child_process from "node:child_process"; 7 | 8 | import remapping, { SourceMapInput } from "@ampproject/remapping"; 9 | import esbuild from "esbuild"; 10 | import webpack from "webpack"; 11 | import { rollup } from "rollup"; 12 | import * as vite from "vite"; 13 | 14 | // If this is not used, rollup does not resolve the react and react-dom imports 15 | // and marks them as external which means they dont end up in our bundle 16 | // and we cant rewrite their source maps. 17 | import { nodeResolve as rollupNodeResolvePlugin } from "@rollup/plugin-node-resolve"; 18 | import rollupDefinePlugin from "@rollup/plugin-replace"; 19 | import rollupPluginCommonJS from "@rollup/plugin-commonjs"; 20 | 21 | // @ts-ignore silence importing of ts modules warning 22 | import * as pkg from "./index.mts"; 23 | 24 | // Poll for the source map to be generated. 25 | function pollForSourceMap() { 26 | return new Promise((resolve, reject) => { 27 | let start = Date.now(); 28 | const interval = setInterval(() => { 29 | if (fs.existsSync(EXPECTED_SOURCEMAP_PATH)) { 30 | clearInterval(interval); 31 | resolve(void 0); 32 | } 33 | if (Date.now() - start > 10_000) { 34 | clearInterval(interval); 35 | reject(new Error("timed out waiting for source map, build failed")); 36 | } 37 | }, 100); 38 | }); 39 | } 40 | 41 | const ReactTemplate = ` 42 | import ReactDOM from "react-dom"; 43 | 44 | function App() { 45 | // avoid jsx so we dont have to perform 46 | // loader and transpile gymnastics. 47 | return "Hello, world!" 48 | } 49 | 50 | // Bailout from dead code elimination 51 | ReactDOM.render(App, document.getElementById("root")); 52 | `; 53 | 54 | const ReactDOMTemplate = ` 55 | import ReactDOM from "react-dom/profiling"; 56 | 57 | function App() { 58 | // avoid jsx so we dont have to perform 59 | // loader and transpile gymnastics. 60 | return "Hello, world!" 61 | } 62 | 63 | // Bailout from dead code elimination 64 | ReactDOM.render(App, document.getElementById("root")); 65 | `; 66 | 67 | const ReactOnlyTemplate = ` 68 | import * as React from "react"; 69 | 70 | const ctx = React.createContext(null); 71 | `; 72 | 73 | const HTMLTemplate = ` 74 | 75 | 76 | 77 | 78 | React App 79 | 80 | 81 |
82 | 83 | 84 | `; 85 | 86 | const RSPackConfigTemplate = (JS_ENTRY_POINT: string, BUILD_OUTPUT_PATH: string) => ` 87 | import * as pkg from "./../index"; 88 | module.exports = { 89 | entry: { 90 | main: "${JS_ENTRY_POINT}", 91 | }, 92 | devtool: "source-map", 93 | output: { 94 | filename: 'index.js', 95 | path: "${BUILD_OUTPUT_PATH}" 96 | }, 97 | plugins: [pkg.RspackReactSourcemapsPlugin()], 98 | }`; 99 | 100 | const SOURCE_DIR = path.resolve("./tmp/"); 101 | const BUILD_OUTPUT_PATH = path.resolve("./tmp/dist/"); 102 | const JS_ENTRY_POINT = path.resolve("./tmp/index.js"); 103 | const HTML_ENTRY_POINT = path.resolve("./tmp/index.html"); 104 | const EXPECTED_SOURCEMAP_PATH = path.resolve("./tmp/dist/index.js.map"); 105 | const EXPECTED_REMAPPED_PATH = path.resolve("./tmp/dist/index.js.remapped.map"); 106 | const RSPACK_CONFIG_PATH = path.resolve("./tmp/rspack.config.js"); 107 | 108 | // Initialize project boilerplate in the tmp directory. 109 | // Source lives in ./tmp/and the build output is generated 110 | // to ./tmp/dist/ 111 | function initProjectBoilerplate() { 112 | if (fs.existsSync(SOURCE_DIR)) { 113 | throw new Error("tmp directory already exists"); 114 | } 115 | 116 | fs.mkdirSync(SOURCE_DIR, { recursive: true }); 117 | fs.writeFileSync(JS_ENTRY_POINT, ReactTemplate); 118 | fs.writeFileSync(HTML_ENTRY_POINT, HTMLTemplate); 119 | fs.writeFileSync(RSPACK_CONFIG_PATH, RSPackConfigTemplate(JS_ENTRY_POINT, BUILD_OUTPUT_PATH)); 120 | } 121 | 122 | function teardown() { 123 | if (!fs.existsSync(SOURCE_DIR)) return; 124 | fs.rmSync(SOURCE_DIR, { recursive: true }); 125 | } 126 | 127 | function assertCleanEnv() { 128 | assert.equal(fs.existsSync(BUILD_OUTPUT_PATH), false, "build output directory already exists"); 129 | assert.equal(fs.existsSync(EXPECTED_SOURCEMAP_PATH), false, "expected sourcemap already exists"); 130 | } 131 | 132 | // We'll run the tests in sequence as they all use the same 133 | // tmp directory and we currently dont have many of them. 134 | // If tests get slow, this is a likely optimization opportunity. 135 | test.before(() => teardown()); 136 | test.beforeEach(() => initProjectBoilerplate()); 137 | test.afterEach(() => teardown()); 138 | test.after(() => teardown()); 139 | 140 | process.on("exit", () => { 141 | teardown(); 142 | }); 143 | 144 | const PKG = { 145 | react: { 146 | original: "react.production.min.js", 147 | rewritten: "react.production.js", 148 | }, 149 | "react-dom": { 150 | original: "react-dom.production.min.js", 151 | rewritten: "react-dom.production.js", 152 | }, 153 | "react-dom/profiling": { 154 | original: "react-dom.profiling.min.js", 155 | rewritten: "/react-dom/profiling.js", 156 | }, 157 | }; 158 | 159 | function hasMinifiedSourcemaps(map: any, pkg = PKG["react-dom"]) { 160 | let hasOriginalSourceMap = false; 161 | let hasRewrittenSourceMap = false; 162 | 163 | remapping(map, (file, ctx) => { 164 | // check if source map contains minified file 165 | if (file.includes(pkg.original)) { 166 | hasOriginalSourceMap = true; 167 | } 168 | // check if source map contains our rewritten file 169 | if (file.includes(pkg.rewritten)) { 170 | hasRewrittenSourceMap = true; 171 | } 172 | }); 173 | return { hasOriginalSourceMap, hasRewrittenSourceMap }; 174 | } 175 | 176 | // The test suite is currently not very exhaustive and only tests the most basic 177 | // case where the build succeeds and the sourcemap is properly configured. We _do_not_ 178 | // test invalid configs (e.g. not generating sourcemaps etc) and our plugin does not warn 179 | // the user if they are not generating sourcemaps. This is up to the user to configure, 180 | // but could be subject to change in case it ends up being confusing. The alternative would 181 | // be to throw an error if sourcemaps are not generated, but this might cause inconvenience 182 | // for users who dont want sourcemaps and would have to disable the plugin. 183 | test("esbuild", async () => { 184 | assertCleanEnv(); 185 | await esbuild.build({ 186 | entryPoints: [JS_ENTRY_POINT], 187 | outdir: BUILD_OUTPUT_PATH, 188 | sourcemap: true, 189 | bundle: true, 190 | define: { "process.env.NODE_ENV": '"production"' }, 191 | plugins: [pkg.EsbuildReactSourcemapsPlugin({})], 192 | }); 193 | 194 | await pollForSourceMap(); 195 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 196 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH) 197 | ); 198 | assert.equal(hasOriginalSourceMap, false, "minified react-dom source maps were found"); 199 | assert.equal(hasRewrittenSourceMap, true, "react-dom source maps were not rewritten"); 200 | }); 201 | 202 | test("webpack", async () => { 203 | assertCleanEnv(); 204 | webpack( 205 | { 206 | entry: JS_ENTRY_POINT, 207 | output: { 208 | path: BUILD_OUTPUT_PATH, 209 | filename: "index.js", 210 | }, 211 | mode: "production", 212 | devtool: "source-map", 213 | plugins: [pkg.WebpackReactSourcemapsPlugin()], 214 | }, 215 | (err, stats) => { 216 | if (err || stats?.hasErrors()) { 217 | throw new Error("webpack build failed"); 218 | } 219 | } 220 | ); 221 | 222 | await pollForSourceMap(); 223 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 224 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH) 225 | ); 226 | assert.equal(hasOriginalSourceMap, false, "minified react-dom source maps were found"); 227 | assert.equal(hasRewrittenSourceMap, true, "react-dom source maps were not rewritten"); 228 | }); 229 | test("rollup", async () => { 230 | // assertCleanEnv() 231 | await rollup({ 232 | input: JS_ENTRY_POINT, 233 | output: { 234 | dir: BUILD_OUTPUT_PATH, 235 | sourcemap: true, 236 | }, 237 | plugins: [ 238 | rollupPluginCommonJS(), 239 | rollupDefinePlugin({ 240 | preventAssignment: true, // silence console warning 241 | "process.env.NODE_ENV": JSON.stringify("production"), 242 | }), 243 | rollupNodeResolvePlugin(), 244 | pkg.RollupReactSourcemapsPlugin(), 245 | ], 246 | }).then(async bundle => { 247 | if (bundle) { 248 | await bundle.write({ 249 | dir: BUILD_OUTPUT_PATH, 250 | sourcemap: true, 251 | }); 252 | } else throw new Error("rollup build failed to write bundle"); 253 | }); 254 | 255 | await pollForSourceMap(); 256 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 257 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH) 258 | ); 259 | assert.equal(hasOriginalSourceMap, false, "minified react-dom source maps were found"); 260 | assert.equal(hasRewrittenSourceMap, true, "react-dom source maps were not rewritten"); 261 | }); 262 | test("vite", async () => { 263 | assertCleanEnv(); 264 | await vite.build({ 265 | root: SOURCE_DIR, 266 | build: { 267 | write: true, 268 | outDir: BUILD_OUTPUT_PATH, 269 | sourcemap: true, 270 | rollupOptions: { 271 | output: { 272 | entryFileNames: `[name].js`, 273 | chunkFileNames: `[name].js`, 274 | assetFileNames: `[name].[ext]`, 275 | }, 276 | }, 277 | }, 278 | plugins: [pkg.ViteReactSourcemapsPlugin()], 279 | }); 280 | await pollForSourceMap(); 281 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 282 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH) 283 | ); 284 | assert.equal(hasOriginalSourceMap, false, "minified react-dom source maps were found"); 285 | assert.equal(hasRewrittenSourceMap, true, "react-dom source maps were not rewritten"); 286 | }); 287 | 288 | // This fails with the following stacktrace. Since rspack support from unplugin is experimental, skip the test for now. 289 | // Error [ERR_REQUIRE_ESM]: require() of ES Module /react-prod-sourcemaps/node_modules/string-width/index.js from /react-prod-sourcemaps/node_modules/cliui/build/index.cjs not supported. 290 | // Instead change the require of index.js in /react-prod-sourcemaps/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules. 291 | // ... 292 | test.skip("rspack", async () => { 293 | assertCleanEnv(); 294 | child_process.execSync(`npx rspack build -c ${RSPACK_CONFIG_PATH}`); 295 | await pollForSourceMap(); 296 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 297 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH) 298 | ); 299 | assert.equal(hasOriginalSourceMap, false, "minified react-dom source maps were found"); 300 | assert.equal(hasRewrittenSourceMap, true, "react-dom source maps were not rewritten"); 301 | }); 302 | 303 | test("react", async () => { 304 | assertCleanEnv(); 305 | 306 | fs.writeFileSync(JS_ENTRY_POINT, ReactOnlyTemplate); 307 | await esbuild.build({ 308 | entryPoints: [JS_ENTRY_POINT], 309 | outdir: BUILD_OUTPUT_PATH, 310 | sourcemap: true, 311 | bundle: true, 312 | define: { "process.env.NODE_ENV": '"production"' }, 313 | plugins: [pkg.EsbuildReactSourcemapsPlugin({ mode: "strict" })], 314 | }); 315 | 316 | await pollForSourceMap(); 317 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 318 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH), 319 | PKG["react"] 320 | ); 321 | 322 | assert.equal( 323 | hasOriginalSourceMap, 324 | false, 325 | "minified react source maps were found in original sourcemap" 326 | ); 327 | assert.equal( 328 | hasRewrittenSourceMap, 329 | true, 330 | "react source maps were not rewritten in original sourcemap" 331 | ); 332 | }); 333 | 334 | test("react-dom/profiling", async () => { 335 | assertCleanEnv(); 336 | 337 | fs.writeFileSync(JS_ENTRY_POINT, ReactDOMTemplate); 338 | await esbuild.build({ 339 | entryPoints: [JS_ENTRY_POINT], 340 | outdir: BUILD_OUTPUT_PATH, 341 | sourcemap: true, 342 | bundle: true, 343 | define: { "process.env.NODE_ENV": '"production"' }, 344 | plugins: [pkg.EsbuildReactSourcemapsPlugin({ mode: "strict" })], 345 | }); 346 | 347 | await pollForSourceMap(); 348 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 349 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH), 350 | PKG["react-dom/profiling"] 351 | ); 352 | 353 | assert.equal( 354 | hasOriginalSourceMap, 355 | false, 356 | "minified react-dom/profiling source maps were found in original sourcemap" 357 | ); 358 | assert.equal( 359 | hasRewrittenSourceMap, 360 | true, 361 | "react-dom/profiling source maps were not rewritten in original sourcemap" 362 | ); 363 | }); 364 | 365 | test("preserve option", async () => { 366 | assertCleanEnv(); 367 | await esbuild.build({ 368 | entryPoints: [JS_ENTRY_POINT], 369 | outdir: BUILD_OUTPUT_PATH, 370 | sourcemap: true, 371 | bundle: true, 372 | define: { "process.env.NODE_ENV": '"production"' }, 373 | plugins: [pkg.EsbuildReactSourcemapsPlugin({ preserve: true, mode: "strict" })], 374 | }); 375 | 376 | await pollForSourceMap(); 377 | const { hasOriginalSourceMap, hasRewrittenSourceMap } = hasMinifiedSourcemaps( 378 | pkg.loadSourcemap(EXPECTED_SOURCEMAP_PATH) 379 | ); 380 | 381 | assert.equal( 382 | hasOriginalSourceMap, 383 | true, 384 | "minified react-dom source maps were found in original sourcemap" 385 | ); 386 | assert.equal( 387 | hasRewrittenSourceMap, 388 | false, 389 | "react-dom source maps were not rewritten in original sourcemap" 390 | ); 391 | 392 | const { 393 | hasOriginalSourceMap: hasOriginalSourceMapInRemappedSourceMap, 394 | hasRewrittenSourceMap: hasRewrittenSourceMapInRemappedSourceMap, 395 | } = hasMinifiedSourcemaps(pkg.loadSourcemap(EXPECTED_REMAPPED_PATH)); 396 | assert.equal( 397 | hasOriginalSourceMapInRemappedSourceMap, 398 | false, 399 | "minified react-dom source maps were found in rewritten sourcemap" 400 | ); 401 | assert.equal( 402 | hasRewrittenSourceMapInRemappedSourceMap, 403 | true, 404 | "react-dom source maps were not rewritten in rewritten sourcemap" 405 | ); 406 | }); 407 | 408 | test("throws in strict mode if no sourcemap is generated", async () => { 409 | assertCleanEnv(); 410 | 411 | // I tried using assert.throws, but it seems to have a race condition 412 | // with our test.afterEach and the build would fail with "failed to resolve index.js" 413 | // as if it did not exist on disk? I'm not sure what's going on, but just await it synchronously 414 | const error = await esbuild 415 | .build({ 416 | entryPoints: [JS_ENTRY_POINT], 417 | outdir: BUILD_OUTPUT_PATH, 418 | // sourcemap: true, Disabled on purpose 419 | define: { "process.env.NODE_ENV": '"production"' }, 420 | plugins: [pkg.EsbuildReactSourcemapsPlugin({ mode: "strict" })], 421 | }) 422 | .catch(e => e); 423 | 424 | assert.match(error.message, /ReactSourceMaps: ❌ No sourcemaps found in bundle./); 425 | }); 426 | -------------------------------------------------------------------------------- /assets/react/17.0.2/react.production.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"react.production.min.js","mappings":";;;;;;;;aAEA,IAAIA,EAAUC,OAAA,CAAQ,eAAR,CAAd,CAUIC,EAAqB,KAVzB,CAWIC,EAAoB,KACxBC,QAAAC,SAAA,CAAmB,KACnBD,QAAAE,WAAA,CAAqB,KACrBF,QAAAG,SAAA,CAAmB,KACnB,KAAIC,EAAsB,KAA1B,CACIC,EAAqB,KAD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AACrI,CAAD,CAAMoI,CAAN,CAAcN,CAAd,CAAoB,CAE9C,MADmBhD,EAAAC,EACZsD,oBAAA,CAA+BrI,CAA/B,CAAoCoI,CAApC,CAA4CN,CAA5C,CAFuC,CA4DhDvL;OAAA+L,gBAAA,CAxEAA,QAAwB,CAACF,CAAD,CAASN,CAAT,CAAe,CAErC,MADmBhD,EAAAC,EACZuD,gBAAA,CAA2BF,CAA3B,CAAmCN,CAAnC,CAF8B,CAyEvCvL,QAAAgM,QAAA,CAjEAA,QAAgB,CAACH,CAAD,CAASN,CAAT,CAAe,CAE7B,MADmBhD,EAAAC,EACZwD,QAAA,CAAmBH,CAAnB,CAA2BN,CAA3B,CAFsB,CAkE/BvL,QAAAiM,WAAA,CAtFAA,QAAmB,CAACC,CAAD,CAAUC,CAAV,CAAsBC,CAAtB,CAA4B,CAE7C,MADmB7D,EAAAC,EACZyD,WAAA,CAAsBC,CAAtB,CAA+BC,CAA/B,CAA2CC,CAA3C,CAFsC,CAuF/CpM,QAAAqM,OAAA,CAnFAA,QAAe,CAACC,CAAD,CAAe,CAE5B,MADmB/D,EAAAC,EACZ6D,OAAA,CAAkBC,CAAlB,CAFqB,CAoF9BtM,QAAAuM,SAAA,CA5FAA,QAAiB,CAACC,CAAD,CAAe,CAE9B,MADmBjE,EAAAC,EACZ+D,SAAA,CAAoBC,CAApB,CAFuB,CA6FhCxM,QAAAyM,QAAA,CAh7BmBC","names":["_assign","require","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","exports","Fragment","StrictMode","Profiler","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","Suspense","REACT_MEMO_TYPE","REACT_LAZY_TYPE","Symbol","for","symbolFor","MAYBE_ITERATOR_SYMBOL","iterator","getIteratorFn","maybeIterable","maybeIterator","FAUX_ITERATOR_SYMBOL","formatProdErrorMessage","code","url","i","arguments","length","encodeURIComponent","ReactNoopUpdateQueue","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","emptyObject","Component","props","context","updater","refs","prototype","isReactComponent","setState","Component.prototype.setState","partialState","callback","Error","forceUpdate","Component.prototype.forceUpdate","ComponentDummy","PureComponent","pureComponentPrototype","constructor","isPureReactComponent","ReactCurrentOwner","current","hasOwnProperty","Object","RESERVED_PROPS","key","ref","__self","__source","createElement","type","config","children","propName","undefined","call","childrenLength","childArray","Array","defaultProps","element","$$typeof","_owner","cloneAndReplaceKey","oldElement","newKey","isValidElement","object","escape","escaperLookup","replace","escapedString","escapeRegex","match","userProvidedKeyEscapeRegex","getElementKey","index","toString","mapIntoArray","array","escapedPrefix","nameSoFar","invokeCallback","child","mappedChild","childKey","SEPARATOR","isArray","escapedChildKey","c","push","subtreeCount","nextNamePrefix","SUBSEPARATOR","nextName","iteratorFn","ii","done","step","next","value","childrenString","keys","join","mapChildren","func","result","count","lazyInitializer","payload","Uninitialized","_status","ctor","_result","thenable","Pending","then","moduleObject","defaultExport","default","Resolved","error","Rejected","ReactCurrentDispatcher","resolveDispatcher","dispatcher","ReactSharedInternals","ReactCurrentBatchConfig","transition","IsSomeRendererActing","assign","Children","map","forEach","forEachChildren","forEachFunc","forEachContext","apply","countChildren","n","toArray","only","onlyChild","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","owner","createContext","defaultValue","calculateChangedBits","_calculateChangedBits","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_context","createElement$1","createFactory","factory","bind","createRef","refObject","forwardRef","render","elementType","lazy","lazyType","_payload","_init","memo","compare","useCallback","deps","useContext","Context","unstable_observedBits","useDebugValue","useEffect","create","useImperativeHandle","useLayoutEffect","useMemo","useReducer","reducer","initialArg","init","useRef","initialValue","useState","initialState","version","ReactVersion"],"sources":["react.production.js"],"sourcesContent":["'use strict';\n\nvar _assign = require('object-assign');\n\n// TODO: this is special because it gets imported during build.\nvar ReactVersion = '17.0.2';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nlet REACT_ELEMENT_TYPE = 0xeac7;\nlet REACT_PORTAL_TYPE = 0xeaca;\nexports.Fragment = 0xeacb;\nexports.StrictMode = 0xeacc;\nexports.Profiler = 0xead2;\nlet REACT_PROVIDER_TYPE = 0xeacd;\nlet REACT_CONTEXT_TYPE = 0xeace;\nlet REACT_FORWARD_REF_TYPE = 0xead0;\nexports.Suspense = 0xead1;\nlet REACT_MEMO_TYPE = 0xead3;\nlet REACT_LAZY_TYPE = 0xead4;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n const symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n exports.Fragment = symbolFor('react.fragment');\n exports.StrictMode = symbolFor('react.strict_mode');\n exports.Profiler = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n exports.Suspense = symbolFor('react.suspense');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n}\n\nconst MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nconst FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n const maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n// Do not require this module directly! Use normal `invariant` calls with\n// template literal strings. The messages will be replaced with error codes\n// during build.\nfunction formatProdErrorMessage(code) {\n let url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;\n\n for (let i = 1; i < arguments.length; i++) {\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n\n return \"Minified React error #\" + code + \"; visit \" + url + \" for the full message or \" + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';\n}\n\n/**\n * This is the abstract API for an update queue.\n */\n\n\nconst ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n }\n};\n\nconst emptyObject = {};\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {\n {\n throw Error( formatProdErrorMessage(85));\n }\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nconst pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\n_assign(pureComponentPrototype, Component.prototype);\n\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n const refObject = {\n current: null\n };\n\n return refObject;\n}\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nconst ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nfunction hasValidRef(config) {\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n\n return config.key !== undefined;\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nconst ReactElement = function (type, key, ref, self, source, owner, props) {\n const element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n let propName; // Reserved names are extracted\n\n const props = {};\n let key = null;\n let ref = null;\n let self = null;\n let source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n const childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n const childArray = Array(childrenLength);\n\n for (let i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n const defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://reactjs.org/docs/react-api.html#createfactory\n */\n\nfunction createFactory(type) {\n const factory = createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook: remove it\n\n factory.type = type;\n return factory;\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n const newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( formatProdErrorMessage(267, element));\n }\n }\n\n let propName; // Original props are copied\n\n const props = _assign({}, element.props); // Reserved names are extracted\n\n\n let key = element.key;\n let ref = element.ref; // Self is preserved since the owner is preserved.\n\n const self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n const source = element._source; // Owner will be preserved, unless ref is overridden\n\n let owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n let defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n const childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n const childArray = Array(childrenLength);\n\n for (let i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nconst SEPARATOR = '.';\nconst SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n const escapeRegex = /[=:]/g;\n const escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n const escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\nconst userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n const type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n let invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n const child = children;\n let mappedChild = callback(child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n const childKey = nameSoFar === '' ? SEPARATOR + getElementKey(child, 0) : nameSoFar;\n\n if (Array.isArray(mappedChild)) {\n let escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', c => c);\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!child || child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n let child;\n let nextName;\n let subtreeCount = 0; // Count of children found in the current subtree.\n\n const nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (let i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n const iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n const iterableChildren = children;\n\n const iterator = iteratorFn.call(iterableChildren);\n let step;\n let ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n const childrenString = '' + children;\n\n {\n {\n throw Error( formatProdErrorMessage(31, childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString));\n }\n }\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n const result = [];\n let count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n let n = 0;\n mapChildren(children, () => {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, child => child) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n {\n throw Error( formatProdErrorMessage(143));\n }\n }\n\n return children;\n}\n\nfunction createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n }\n\n const context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n\n {\n context.Consumer = context;\n }\n\n return context;\n}\n\nconst Uninitialized = -1;\nconst Pending = 0;\nconst Resolved = 1;\nconst Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n const ctor = payload._result;\n const thenable = ctor(); // Transition to the next state.\n\n const pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n thenable.then(moduleObject => {\n if (payload._status === Pending) {\n const defaultExport = moduleObject.default;\n\n\n const resolved = payload;\n resolved._status = Resolved;\n resolved._result = defaultExport;\n }\n }, error => {\n if (payload._status === Pending) {\n // Transition to the next state.\n const rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n }\n\n if (payload._status === Resolved) {\n return payload._result;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n const payload = {\n // We use these fields to store the result.\n _status: -1,\n _result: ctor\n };\n const lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n\n const elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render\n };\n\n return elementType;\n}\n\nfunction memo(type, compare) {\n\n const elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type,\n compare: compare === undefined ? null : compare\n };\n\n return elementType;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nconst ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nfunction resolveDispatcher() {\n const dispatcher = ReactCurrentDispatcher.current;\n\n if (!(dispatcher !== null)) {\n {\n throw Error( formatProdErrorMessage(321));\n }\n }\n\n return dispatcher;\n}\n\nfunction useContext(Context, unstable_observedBits) {\n const dispatcher = resolveDispatcher();\n\n return dispatcher.useContext(Context, unstable_observedBits);\n}\nfunction useState(initialState) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n}\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nconst ReactCurrentBatchConfig = {\n transition: 0\n};\n\n/**\n * Used by act() to track whether you're inside an act() scope.\n */\nconst IsSomeRendererActing = {\n current: false\n};\n\nconst ReactSharedInternals = {\n ReactCurrentDispatcher,\n ReactCurrentBatchConfig,\n ReactCurrentOwner,\n IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n assign: _assign\n};\n\nconst createElement$1 = createElement;\nconst cloneElement$1 = cloneElement;\nconst createFactory$1 = createFactory;\nconst Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.PureComponent = PureComponent;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory$1;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useEffect = useEffect;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.version = ReactVersion;"]} -------------------------------------------------------------------------------- /assets/react/18.1.0/react.production.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"react.production.min.js","mappings":";;;;;;;;;aAMA,IAAMA,EAAsBC,MAAAC,IAAA,CAAW,eAAX,CAA5B,CACMC,EAAqBF,MAAAC,IAAA,CAAW,cAAX,CAD3B,CAEME,EAAuBH,MAAAC,IAAA,CAAW,gBAAX,CAF7B,CAGMG,EAA0BJ,MAAAC,IAAA,CAAW,mBAAX,CAHhC,CAIMI,EAAuBL,MAAAC,IAAA,CAAW,gBAAX,CAJ7B,CAKMK,EAAuBN,MAAAC,IAAA,CAAW,gBAAX,CAL7B,CAMMM,EAAsBP,MAAAC,IAAA,CAAW,eAAX,CAN5B,CAOMO,EAA0BR,MAAAC,IAAA,CAAW,mBAAX,CAPhC,CAQMQ,EAAuBT,MAAAC,IAAA,CAAW,gBAAX,CAR7B,CASMS,EAAmBV,MAAAC,IAAA,CAAW,YAAX,CATzB,CAUMU,EAAmBX,MAAAC,IAAA,CAAW,YAAX,CAVzB,CAWMW,EAAyBZ,MAAAa,SAE/BC,SAASA,EAAa,CAACC,CAAD,CAAgB,CACpC,GAAsB,IAAtB,GAAIA,CAAJ,EAAuD,QAAvD,GAA8B,MAAOA,EAArC,CACE,MAAO,KAGHC,GAAgBJ,CAAhBI,EAAyCD,CAAA,CAAcH,CAAd,CAAzCI,EAAiFD,CAAA,CAN5DE,YAM4D,CAEvF,OAA6B,UAA7B,GAAI,MAAOD,EAAX,CACSA,CADT,CAIO,IAX6B;AAmBtC,IAAME,EAAuB,CAQ3BC,UAAWA,QAAS,EAAiB,CACnC,MAAO,EAD4B,CARV,CA2B3BC,mBAAoBA,QAAS,EAAuC,EA3BzC,CA2C3BC,oBAAqBA,QAAS,EAAsD,EA3CzD,CA0D3BC,gBAAiBA,QAAS,EAAqD,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oBC,CAApB,CAFuB,CAiIhCtE,QAAAuE,qBAAA,CA/EAA,QAA6B,CAACC,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAA4C,CAEvE,MAhEmB9E,EAAAjF,QAgEZ4J,qBAAA,CAAgCC,CAAhC,CAA2CC,CAA3C,CAAwDC,CAAxD,CAFgE,CAgFzE1E;OAAA2E,cAAA,CA5FAA,QAAsB,EAAG,CAEvB,MApDmB/E,EAAAjF,QAoDZgK,cAAA,EAFgB,CA6FzB3E,QAAA4E,QAAA,CA57BmBC","names":["REACT_ELEMENT_TYPE","Symbol","for","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","getIteratorFn","maybeIterable","maybeIterator","FAUX_ITERATOR_SYMBOL","ReactNoopUpdateQueue","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","assign","Object","emptyObject","Component","props","context","updater","refs","prototype","isReactComponent","setState","Component.prototype.setState","partialState","callback","Error","forceUpdate","Component.prototype.forceUpdate","ComponentDummy","PureComponent","pureComponentPrototype","constructor","isPureReactComponent","isArrayImpl","Array","isArray","hasOwnProperty","ReactCurrentOwner","current","RESERVED_PROPS","key","ref","__self","__source","createElement","type","config","children","propName","undefined","call","childrenLength","arguments","length","childArray","i","defaultProps","element","$$typeof","_owner","cloneAndReplaceKey","oldElement","newKey","isValidElement","object","escape","escaperLookup","replace","escapedString","escapeRegex","match","userProvidedKeyEscapeRegex","getElementKey","index","toString","mapIntoArray","array","escapedPrefix","nameSoFar","invokeCallback","child","mappedChild","childKey","SEPARATOR","escapedChildKey","c","push","subtreeCount","nextNamePrefix","SUBSEPARATOR","nextName","iteratorFn","ii","done","step","next","value","childrenString","String","keys","join","mapChildren","func","result","count","lazyInitializer","payload","Uninitialized","_status","ctor","_result","thenable","then","moduleObject","Pending","Resolved","error","Rejected","default","ReactCurrentDispatcher","ReactCurrentBatchConfig","transition","ReactSharedInternals","exports","Children","map","forEach","forEachChildren","forEachFunc","forEachContext","apply","countChildren","n","toArray","only","onlyChild","Fragment","Profiler","StrictMode","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","owner","createContext","defaultValue","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","_context","createElement$1","createFactory","factory","bind","createRef","refObject","forwardRef","render","elementType","lazy","lazyType","_payload","_init","memo","compare","startTransition","scope","prevTransition","unstable_act","act","useCallback","deps","useContext","Context","useDebugValue","useDeferredValue","useEffect","create","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","reducer","initialArg","init","useRef","initialValue","useState","initialState","useSyncExternalStore","subscribe","getSnapshot","getServerSnapshot","useTransition","version","ReactVersion"],"sources":["react.production.js"],"sourcesContent":["'use strict';\n\nvar ReactVersion = '18.1.0';\n\n// ATTENTION\n\nconst REACT_ELEMENT_TYPE = Symbol.for('react.element');\nconst REACT_PORTAL_TYPE = Symbol.for('react.portal');\nconst REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nconst REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nconst REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nconst REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nconst REACT_CONTEXT_TYPE = Symbol.for('react.context');\nconst REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nconst REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nconst REACT_MEMO_TYPE = Symbol.for('react.memo');\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\nconst MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nconst FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n const maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * This is the abstract API for an update queue.\n */\n\n\nconst ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n }\n};\n\nconst assign = Object.assign;\n\nconst emptyObject = {};\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nconst pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n const refObject = {\n current: null\n };\n\n return refObject;\n}\n\nconst isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nconst ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nconst RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nfunction hasValidRef(config) {\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n\n return config.key !== undefined;\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nconst ReactElement = function (type, key, ref, self, source, owner, props) {\n const element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n let propName; // Reserved names are extracted\n\n const props = {};\n let key = null;\n let ref = null;\n let self = null;\n let source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n\n if (hasValidKey(config)) {\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n const childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n const childArray = Array(childrenLength);\n\n for (let i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n const defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://reactjs.org/docs/react-api.html#createfactory\n */\n\nfunction createFactory(type) {\n const factory = createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook: remove it\n\n factory.type = type;\n return factory;\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n const newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n let propName; // Original props are copied\n\n const props = assign({}, element.props); // Reserved names are extracted\n\n let key = element.key;\n let ref = element.ref; // Self is preserved since the owner is preserved.\n\n const self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n const source = element._source; // Owner will be preserved, unless ref is overridden\n\n let owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n let defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n const childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n const childArray = Array(childrenLength);\n\n for (let i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nconst SEPARATOR = '.';\nconst SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n const escapeRegex = /[=:]/g;\n const escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n const escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\nconst userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n const type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n let invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n const child = children;\n let mappedChild = callback(child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n const childKey = nameSoFar === '' ? SEPARATOR + getElementKey(child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n let escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', c => c);\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!child || child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n let child;\n let nextName;\n let subtreeCount = 0; // Count of children found in the current subtree.\n\n const nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (let i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n const iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n const iterableChildren = children;\n\n const iterator = iteratorFn.call(iterableChildren);\n let step;\n let ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n const childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n const result = [];\n let count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n let n = 0;\n mapChildren(children, () => {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, child => child) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n const context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n\n {\n context.Consumer = context;\n }\n\n return context;\n}\n\nconst Uninitialized = -1;\nconst Pending = 0;\nconst Resolved = 1;\nconst Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n const ctor = payload._result;\n const thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(moduleObject => {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n const resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, error => {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n const rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n const pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n const moduleObject = payload._result;\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n const payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n const lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n\n const elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render\n };\n\n return elementType;\n}\n\nfunction memo(type, compare) {\n\n const elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type,\n compare: compare === undefined ? null : compare\n };\n\n return elementType;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nconst ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nfunction resolveDispatcher() {\n const dispatcher = ReactCurrentDispatcher.current;\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n const dispatcher = resolveDispatcher();\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n}\nfunction useTransition() {\n const dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n const dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nconst ReactCurrentBatchConfig = {\n transition: null\n};\n\nconst ReactSharedInternals = {\n ReactCurrentDispatcher,\n ReactCurrentBatchConfig,\n ReactCurrentOwner\n};\n\nfunction startTransition(scope, options) {\n const prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction act(callback) {\n {\n throw new Error('act(...) is not supported in production builds of React.');\n }\n}\n\nconst createElement$1 = createElement;\nconst cloneElement$1 = cloneElement;\nconst createFactory$1 = createFactory;\nconst Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory$1;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;"]} -------------------------------------------------------------------------------- /assets/react/18.2.0/react.production.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"react.production.min.js","mappings":";;;;;;;;;aAQA,IAAMA,EAAqBC,MAAAC,IAAA,CAAW,eAAX,CAA3B,CACMC,EAAoBF,MAAAC,IAAA,CAAW,cAAX,CAD1B,CAEME,EAAsBH,MAAAC,IAAA,CAAW,gBAAX,CAF5B,CAGMG,EAAyBJ,MAAAC,IAAA,CAAW,mBAAX,CAH/B,CAIMI,EAAsBL,MAAAC,IAAA,CAAW,gBAAX,CAJ5B,CAKMK,EAAsBN,MAAAC,IAAA,CAAW,gBAAX,CAL5B,CAMMM,EAAqBP,MAAAC,IAAA,CAAW,eAAX,CAN3B,CAOMO,EAAyBR,MAAAC,IAAA,CAAW,mBAAX,CAP/B,CAQMQ,EAAsBT,MAAAC,IAAA,CAAW,gBAAX,CAR5B,CASMS,EAAkBV,MAAAC,IAAA,CAAW,YAAX,CATxB,CAUMU,EAAkBX,MAAAC,IAAA,CAAW,YAAX,CAVxB,CAWMW,EAAwBZ,MAAAa,SAE9BC,SAASA,EAAa,CAACC,CAAD,CAAgB,CACpC,GAAsB,IAAtB,GAAIA,CAAJ,EAAuD,QAAvD,GAA8B,MAAOA,EAArC,CACE,MAAO,KAGHC,GAAgBJ,CAAhBI,EAAyCD,CAAA,CAAcH,CAAd,CAAzCI,EAAiFD,CAAA,CAN5DE,YAM4D,CAEvF,OAA6B,UAA7B,GAAI,MAAOD,EAAX,CACSA,CADT,CAIO,IAX6B;AAmBtC,IAAME,EAAuB,CAQ3BC,UAAWA,QAAS,EAAiB,CACnC,MAAO,EAD4B,CARV,CA2B3BC,mBAAoBA,QAAS,EAAuC,EA3BzC,CA2C3BC,oBAAqBA,QAAS,EAAsD,EA3CzD,CA0D3BC,gBAAiBA,QAAS,EAAqD,EA1DpD,CAA7B,CA8DMC,EAASC,MAAAD,OA9Df,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CA/EAA,QAA6B,CAACC,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAA4C,CAEvE,MAhEmB9E,EAAAjF,QAgEZ4J,qBAAA,CAAgCC,CAAhC,CAA2CC,CAA3C,CAAwDC,CAAxD,CAFgE,CAgFzE1E;OAAA2E,cAAA,CA5FAA,QAAsB,EAAG,CAEvB,MApDmB/E,EAAAjF,QAoDZgK,cAAA,EAFgB,CA6FzB3E,QAAA4E,QAAA,CA97BmBC","names":["REACT_ELEMENT_TYPE","Symbol","for","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","getIteratorFn","maybeIterable","maybeIterator","FAUX_ITERATOR_SYMBOL","ReactNoopUpdateQueue","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","assign","Object","emptyObject","Component","props","context","updater","refs","prototype","isReactComponent","setState","Component.prototype.setState","partialState","callback","Error","forceUpdate","Component.prototype.forceUpdate","ComponentDummy","PureComponent","pureComponentPrototype","constructor","isPureReactComponent","isArrayImpl","Array","isArray","hasOwnProperty","ReactCurrentOwner","current","RESERVED_PROPS","key","ref","__self","__source","createElement","type","config","children","propName","undefined","call","childrenLength","arguments","length","childArray","i","defaultProps","element","$$typeof","_owner","cloneAndReplaceKey","oldElement","newKey","isValidElement","object","escape","escaperLookup","replace","escapedString","escapeRegex","match","userProvidedKeyEscapeRegex","getElementKey","index","toString","mapIntoArray","array","escapedPrefix","nameSoFar","invokeCallback","child","mappedChild","childKey","SEPARATOR","escapedChildKey","c","push","subtreeCount","nextNamePrefix","SUBSEPARATOR","nextName","iteratorFn","ii","done","step","next","value","childrenString","String","keys","join","mapChildren","func","result","count","lazyInitializer","payload","Uninitialized","_status","ctor","_result","thenable","then","moduleObject","Pending","Resolved","error","Rejected","default","ReactCurrentDispatcher","ReactCurrentBatchConfig","transition","ReactSharedInternals","exports","Children","map","forEach","forEachChildren","forEachFunc","forEachContext","apply","countChildren","n","toArray","only","onlyChild","Fragment","Profiler","StrictMode","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","owner","createContext","defaultValue","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","_context","createElement$1","createFactory","factory","bind","createRef","refObject","forwardRef","render","elementType","lazy","lazyType","_payload","_init","memo","compare","startTransition","scope","prevTransition","unstable_act","act","useCallback","deps","useContext","Context","useDebugValue","useDeferredValue","useEffect","create","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","reducer","initialArg","init","useRef","initialValue","useState","initialState","useSyncExternalStore","subscribe","getSnapshot","getServerSnapshot","useTransition","version","ReactVersion"],"sources":["react.production.js"],"sourcesContent":["'use strict';\n\nvar ReactVersion = '18.2.0';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nconst REACT_ELEMENT_TYPE = Symbol.for('react.element');\nconst REACT_PORTAL_TYPE = Symbol.for('react.portal');\nconst REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nconst REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nconst REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nconst REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nconst REACT_CONTEXT_TYPE = Symbol.for('react.context');\nconst REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nconst REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nconst REACT_MEMO_TYPE = Symbol.for('react.memo');\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\nconst MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nconst FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n const maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * This is the abstract API for an update queue.\n */\n\n\nconst ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n }\n};\n\nconst assign = Object.assign;\n\nconst emptyObject = {};\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nconst pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n const refObject = {\n current: null\n };\n\n return refObject;\n}\n\nconst isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nconst ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nconst RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nfunction hasValidRef(config) {\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n\n return config.key !== undefined;\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nconst ReactElement = function (type, key, ref, self, source, owner, props) {\n const element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n let propName; // Reserved names are extracted\n\n const props = {};\n let key = null;\n let ref = null;\n let self = null;\n let source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n\n if (hasValidKey(config)) {\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n const childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n const childArray = Array(childrenLength);\n\n for (let i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n const defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://reactjs.org/docs/react-api.html#createfactory\n */\n\nfunction createFactory(type) {\n const factory = createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook: remove it\n\n factory.type = type;\n return factory;\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n const newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n let propName; // Original props are copied\n\n const props = assign({}, element.props); // Reserved names are extracted\n\n let key = element.key;\n let ref = element.ref; // Self is preserved since the owner is preserved.\n\n const self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n const source = element._source; // Owner will be preserved, unless ref is overridden\n\n let owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n let defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n const childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n const childArray = Array(childrenLength);\n\n for (let i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nconst SEPARATOR = '.';\nconst SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n const escapeRegex = /[=:]/g;\n const escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n const escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\nconst userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n const type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n let invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n const child = children;\n let mappedChild = callback(child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n const childKey = nameSoFar === '' ? SEPARATOR + getElementKey(child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n let escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', c => c);\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!child || child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n let child;\n let nextName;\n let subtreeCount = 0; // Count of children found in the current subtree.\n\n const nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (let i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n const iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n const iterableChildren = children;\n\n const iterator = iteratorFn.call(iterableChildren);\n let step;\n let ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n const childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n const result = [];\n let count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n let n = 0;\n mapChildren(children, () => {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, child => child) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n const context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n\n {\n context.Consumer = context;\n }\n\n return context;\n}\n\nconst Uninitialized = -1;\nconst Pending = 0;\nconst Resolved = 1;\nconst Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n const ctor = payload._result;\n const thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(moduleObject => {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n const resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, error => {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n const rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n const pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n const moduleObject = payload._result;\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n const payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n const lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n\n const elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render\n };\n\n return elementType;\n}\n\nfunction memo(type, compare) {\n\n const elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type,\n compare: compare === undefined ? null : compare\n };\n\n return elementType;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nconst ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nfunction resolveDispatcher() {\n const dispatcher = ReactCurrentDispatcher.current;\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n const dispatcher = resolveDispatcher();\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n}\nfunction useTransition() {\n const dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n const dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n const dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nconst ReactCurrentBatchConfig = {\n transition: null\n};\n\nconst ReactSharedInternals = {\n ReactCurrentDispatcher,\n ReactCurrentBatchConfig,\n ReactCurrentOwner\n};\n\nfunction startTransition(scope, options) {\n const prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction act(callback) {\n {\n throw new Error('act(...) is not supported in production builds of React.');\n }\n}\n\nconst createElement$1 = createElement;\nconst cloneElement$1 = cloneElement;\nconst createFactory$1 = createFactory;\nconst Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory$1;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;"]} --------------------------------------------------------------------------------