@expo/cli 1.0.0-canary-20250404-87e2506 → 1.0.0-canary-20250630-547cd82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -24
- package/build/bin/cli +1 -1
- package/build/metro-require/require.js +6 -4
- package/build/src/api/user/actions.js +25 -11
- package/build/src/api/user/actions.js.map +1 -1
- package/build/src/customize/templates.js +15 -1
- package/build/src/customize/templates.js.map +1 -1
- package/build/src/export/exportApp.js +26 -14
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportAsync.js +6 -0
- package/build/src/export/exportAsync.js.map +1 -1
- package/build/src/export/exportHermes.js +2 -2
- package/build/src/export/exportHermes.js.map +1 -1
- package/build/src/export/persistMetroAssets.js.map +1 -1
- package/build/src/install/checkPackages.js +22 -4
- package/build/src/install/checkPackages.js.map +1 -1
- package/build/src/install/index.js +3 -1
- package/build/src/install/index.js.map +1 -1
- package/build/src/install/resolveOptions.js +7 -2
- package/build/src/install/resolveOptions.js.map +1 -1
- package/build/src/install/utils/checkPackagesCompatibility.js +1 -1
- package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
- package/build/src/lint/ESlintPrerequisite.js +32 -48
- package/build/src/lint/ESlintPrerequisite.js.map +1 -1
- package/build/src/lint/index.js +45 -47
- package/build/src/lint/index.js.map +1 -1
- package/build/src/lint/lintAsync.js +150 -4
- package/build/src/lint/lintAsync.js.map +1 -1
- package/build/src/lint/resolveOptions.js +115 -0
- package/build/src/lint/resolveOptions.js.map +1 -0
- package/build/src/prebuild/renameTemplateAppName.js +4 -1
- package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
- package/build/src/prebuild/resolveTemplate.js +4 -4
- package/build/src/prebuild/resolveTemplate.js.map +1 -1
- package/build/src/prebuild/updatePackageJson.js +19 -9
- package/build/src/prebuild/updatePackageJson.js.map +1 -1
- package/build/src/run/android/resolveOptions.js +13 -1
- package/build/src/run/android/resolveOptions.js.map +1 -1
- package/build/src/run/android/runAndroidAsync.js +39 -17
- package/build/src/run/android/runAndroidAsync.js.map +1 -1
- package/build/src/run/ios/XcodeBuild.js +3 -3
- package/build/src/run/ios/XcodeBuild.js.map +1 -1
- package/build/src/run/ios/options/resolveOptions.js +13 -1
- package/build/src/run/ios/options/resolveOptions.js.map +1 -1
- package/build/src/run/ios/runIosAsync.js +38 -7
- package/build/src/run/ios/runIosAsync.js.map +1 -1
- package/build/src/start/doctor/SecurityBinPrerequisite.js +1 -1
- package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcodePrerequisite.js +1 -1
- package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +1 -1
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
- package/build/src/start/doctor/dependencies/resolvePackages.js +1 -1
- package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
- package/build/src/start/index.js +1 -1
- package/build/src/start/index.js.map +1 -1
- package/build/src/start/platforms/PlatformManager.js +1 -1
- package/build/src/start/platforms/PlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/AndroidPlatformManager.js +1 -1
- package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/getDevices.js +1 -1
- package/build/src/start/platforms/android/getDevices.js.map +1 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js +1 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
- package/build/src/start/platforms/ios/xcrun.js +1 -1
- package/build/src/start/platforms/ios/xcrun.js.map +1 -1
- package/build/src/start/project/dotExpo.js +5 -0
- package/build/src/start/project/dotExpo.js.map +1 -1
- package/build/src/start/resolveOptions.js +3 -0
- package/build/src/start/resolveOptions.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +38 -26
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +29 -2
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/createExpoFallbackResolver.js +6 -4
- package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
- package/build/src/start/server/metro/createJResolver.js +2 -2
- package/build/src/start/server/metro/createJResolver.js.map +1 -1
- package/build/src/start/server/metro/createServerComponentsMiddleware.js +16 -5
- package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -19
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
- package/build/src/start/server/metro/externals.js +1 -1
- package/build/src/start/server/metro/externals.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +13 -8
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +21 -2
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js +15 -12
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.js +19 -8
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/metro/runServer-fork.js +1 -1
- package/build/src/start/server/metro/runServer-fork.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +8 -2
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/middleware/CorsMiddleware.js +1 -1
- package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +4 -8
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/inspector/JsInspector.js +2 -25
- package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
- package/build/src/start/server/middleware/metroOptions.js +2 -26
- package/build/src/start/server/middleware/metroOptions.js.map +1 -1
- package/build/src/utils/build-cache-providers/helpers.js +61 -0
- package/build/src/utils/build-cache-providers/helpers.js.map +1 -0
- package/build/src/utils/build-cache-providers/index.js +283 -0
- package/build/src/utils/build-cache-providers/index.js.map +1 -0
- package/build/src/utils/codesigning.js +14 -2
- package/build/src/utils/codesigning.js.map +1 -1
- package/build/src/utils/exit.js +0 -1
- package/build/src/utils/exit.js.map +1 -1
- package/build/src/utils/ip.js +7 -104
- package/build/src/utils/ip.js.map +1 -1
- package/build/src/utils/modifyConfigAsync.js +1 -1
- package/build/src/utils/modifyConfigAsync.js.map +1 -1
- package/build/src/utils/resolveArgs.js +8 -0
- package/build/src/utils/resolveArgs.js.map +1 -1
- package/build/src/utils/scheme.js +1 -1
- package/build/src/utils/scheme.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +2 -2
- package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/build/src/utils/tsconfig/evaluateTsConfig.js +7 -2
- package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
- package/build/src/utils/variadic.js +63 -6
- package/build/src/utils/variadic.js.map +1 -1
- package/package.json +20 -20
- package/static/canary/react-is/cjs/react-is.development.js +118 -185
- package/static/canary/react-is/cjs/react-is.production.js +2 -2
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +16582 -26565
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +3495 -3357
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +3929 -3801
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16869 -27032
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3535 -3428
- package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4198 -4095
- package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +387 -684
- package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -9
- package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +137 -195
- package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -5
- package/static/canary/scheduler/cjs/scheduler.development.js +339 -600
- package/static/canary/scheduler/cjs/scheduler.native.development.js +324 -512
- package/static/canary/scheduler/cjs/scheduler.native.production.js +6 -5
- package/static/canary/scheduler/cjs/scheduler.production.js +16 -17
- package/static/canary-full/react/cjs/react-compiler-runtime.development.js +13 -68
- package/static/canary-full/react/cjs/react-jsx-dev-runtime.development.js +317 -1251
- package/static/canary-full/react/cjs/react-jsx-dev-runtime.react-server.development.js +353 -1286
- package/static/canary-full/react/cjs/react-jsx-runtime.development.js +326 -1279
- package/static/canary-full/react/cjs/react-jsx-runtime.react-server.development.js +353 -1286
- package/static/canary-full/react/cjs/react.development.js +1204 -2771
- package/static/canary-full/react/cjs/react.production.js +25 -20
- package/static/canary-full/react/cjs/react.react-server.development.js +783 -2162
- package/static/canary-full/react/cjs/react.react-server.production.js +13 -63
- package/static/canary-full/react/package.json +1 -1
- package/static/canary-full/react-dom/cjs/react-dom-client.development.js +24847 -37099
- package/static/canary-full/react-dom/cjs/react-dom-client.production.js +8261 -7475
- package/static/canary-full/react-dom/cjs/react-dom-profiling.development.js +25252 -37571
- package/static/canary-full/react-dom/cjs/react-dom-profiling.profiling.js +9442 -8662
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.development.js +8944 -11568
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.production.js +1378 -944
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.development.js +8944 -11568
- package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.production.js +1386 -954
- package/static/canary-full/react-dom/cjs/react-dom-server.browser.development.js +9344 -11600
- package/static/canary-full/react-dom/cjs/react-dom-server.browser.production.js +1545 -954
- package/static/canary-full/react-dom/cjs/react-dom-server.bun.development.js +8286 -11064
- package/static/canary-full/react-dom/cjs/react-dom-server.bun.production.js +1437 -976
- package/static/canary-full/react-dom/cjs/react-dom-server.edge.development.js +9356 -11609
- package/static/canary-full/react-dom/cjs/react-dom-server.edge.production.js +1542 -970
- package/static/canary-full/react-dom/cjs/react-dom-server.node.development.js +9227 -11571
- package/static/canary-full/react-dom/cjs/react-dom-server.node.production.js +1787 -1183
- package/static/canary-full/react-dom/cjs/react-dom-test-utils.development.js +13 -59
- package/static/canary-full/react-dom/cjs/react-dom.development.js +402 -604
- package/static/canary-full/react-dom/cjs/react-dom.production.js +4 -3
- package/static/canary-full/react-dom/cjs/react-dom.react-server.development.js +322 -382
- package/static/canary-full/react-dom/cjs/react-dom.react-server.production.js +6 -7
- package/static/canary-full/react-dom/package.json +5 -5
- package/static/canary-full/react-dom/static.browser.js +1 -0
- package/static/canary-full/react-dom/static.edge.js +1 -0
- package/static/canary-full/react-dom/static.node.js +1 -0
- package/static/template/eslint.config.js +10 -0
|
@@ -8,619 +8,417 @@
|
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
19
|
-
if (
|
|
20
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
21
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
|
|
22
|
-
'function'
|
|
23
|
-
) {
|
|
24
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
25
|
-
}
|
|
26
|
-
var React = require('react');
|
|
27
|
-
|
|
28
|
-
var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
29
|
-
|
|
30
|
-
function error(format) {
|
|
31
|
-
{
|
|
32
|
-
{
|
|
33
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
34
|
-
args[_key2 - 1] = arguments[_key2];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
printWarning('error', format, args);
|
|
11
|
+
"use strict";
|
|
12
|
+
"production" !== process.env.NODE_ENV &&
|
|
13
|
+
(function () {
|
|
14
|
+
function noop() {}
|
|
15
|
+
function testStringCoercion(value) {
|
|
16
|
+
return "" + value;
|
|
38
17
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (stack !== '') {
|
|
49
|
-
format += '%s';
|
|
50
|
-
args = args.concat([stack]);
|
|
51
|
-
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var argsWithFormat = args.map(function (item) {
|
|
55
|
-
return String(item);
|
|
56
|
-
}); // Careful: RN currently depends on this prefix
|
|
57
|
-
|
|
58
|
-
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
59
|
-
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
60
|
-
// eslint-disable-next-line react-internal/no-production-logging
|
|
61
|
-
|
|
62
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// -----------------------------------------------------------------------------
|
|
67
|
-
// React DOM Chopping Block
|
|
68
|
-
//
|
|
69
|
-
// Similar to main Chopping Block but only flags related to React DOM. These are
|
|
70
|
-
// grouped because we will likely batch all of them into a single major release.
|
|
71
|
-
// -----------------------------------------------------------------------------
|
|
72
|
-
// Disable support for comment nodes as React DOM containers. Already disabled
|
|
73
|
-
// in open source, but www codebase still relies on it. Need to remove.
|
|
74
|
-
|
|
75
|
-
var disableCommentsAsDOMContainers = true;
|
|
76
|
-
|
|
77
|
-
var NoLane =
|
|
78
|
-
/* */
|
|
79
|
-
0;
|
|
80
|
-
var SyncLane =
|
|
81
|
-
/* */
|
|
82
|
-
2;
|
|
83
|
-
|
|
84
|
-
var NoEventPriority = NoLane;
|
|
85
|
-
var DiscreteEventPriority = SyncLane;
|
|
86
|
-
|
|
87
|
-
function noop() {}
|
|
88
|
-
|
|
89
|
-
function requestFormReset$1(element) {
|
|
90
|
-
throw new Error('Invalid form element. requestFormReset must be passed a form that was ' + 'rendered by React.');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
var DefaultDispatcher = {
|
|
94
|
-
f
|
|
95
|
-
/* flushSyncWork */
|
|
96
|
-
: noop,
|
|
97
|
-
r
|
|
98
|
-
/* requestFormReset */
|
|
99
|
-
: requestFormReset$1,
|
|
100
|
-
D
|
|
101
|
-
/* prefetchDNS */
|
|
102
|
-
: noop,
|
|
103
|
-
C
|
|
104
|
-
/* preconnect */
|
|
105
|
-
: noop,
|
|
106
|
-
L
|
|
107
|
-
/* preload */
|
|
108
|
-
: noop,
|
|
109
|
-
m
|
|
110
|
-
/* preloadModule */
|
|
111
|
-
: noop,
|
|
112
|
-
X
|
|
113
|
-
/* preinitScript */
|
|
114
|
-
: noop,
|
|
115
|
-
S
|
|
116
|
-
/* preinitStyle */
|
|
117
|
-
: noop,
|
|
118
|
-
M
|
|
119
|
-
/* preinitModuleScript */
|
|
120
|
-
: noop
|
|
121
|
-
};
|
|
122
|
-
var Internals = {
|
|
123
|
-
d
|
|
124
|
-
/* ReactDOMCurrentDispatcher */
|
|
125
|
-
: DefaultDispatcher,
|
|
126
|
-
p
|
|
127
|
-
/* currentUpdatePriority */
|
|
128
|
-
: NoEventPriority,
|
|
129
|
-
findDOMNode: null
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
var ReactVersion = '19.0.0-beta-4508873393-20240430';
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* HTML nodeType values that represent the type of the node
|
|
136
|
-
*/
|
|
137
|
-
var ELEMENT_NODE = 1;
|
|
138
|
-
var DOCUMENT_NODE = 9;
|
|
139
|
-
var DOCUMENT_FRAGMENT_NODE = 11;
|
|
140
|
-
|
|
141
|
-
function isValidContainer(node) {
|
|
142
|
-
return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers ));
|
|
143
|
-
} // TODO: Remove this function which also includes comment nodes.
|
|
144
|
-
|
|
145
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
146
|
-
|
|
147
|
-
/*
|
|
148
|
-
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
|
|
149
|
-
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
150
|
-
*
|
|
151
|
-
* The functions in this module will throw an easier-to-understand,
|
|
152
|
-
* easier-to-debug exception with a clear errors message message explaining the
|
|
153
|
-
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
154
|
-
* of the `value` object).
|
|
155
|
-
*/
|
|
156
|
-
// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
|
|
157
|
-
function typeName(value) {
|
|
158
|
-
{
|
|
159
|
-
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
160
|
-
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
161
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]
|
|
162
|
-
|
|
163
|
-
return type;
|
|
164
|
-
}
|
|
165
|
-
} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
function willCoercionThrow(value) {
|
|
169
|
-
{
|
|
170
|
-
try {
|
|
171
|
-
testStringCoercion(value);
|
|
172
|
-
return false;
|
|
173
|
-
} catch (e) {
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function testStringCoercion(value) {
|
|
180
|
-
// If you ended up here by following an exception call stack, here's what's
|
|
181
|
-
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
182
|
-
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
183
|
-
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
184
|
-
//
|
|
185
|
-
// The most common types that will cause this exception are `Symbol` instances
|
|
186
|
-
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
187
|
-
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
188
|
-
// exception. (Library authors do this to prevent users from using built-in
|
|
189
|
-
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
190
|
-
// methods are needed to perform accurate arithmetic or comparison.)
|
|
191
|
-
//
|
|
192
|
-
// To fix the problem, coerce this object or symbol value to a string before
|
|
193
|
-
// passing it to React. The most reliable way is usually `String(value)`.
|
|
194
|
-
//
|
|
195
|
-
// To find which value is throwing, check the browser or debugger console.
|
|
196
|
-
// Before this exception was thrown, there should be `console.error` output
|
|
197
|
-
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
198
|
-
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
199
|
-
// In most cases, this console output also shows the component and its
|
|
200
|
-
// ancestor components where the exception happened.
|
|
201
|
-
//
|
|
202
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
203
|
-
return '' + value;
|
|
204
|
-
}
|
|
205
|
-
function checkKeyStringCoercion(value) {
|
|
206
|
-
{
|
|
207
|
-
if (willCoercionThrow(value)) {
|
|
208
|
-
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));
|
|
209
|
-
|
|
210
|
-
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
|
|
216
|
-
implementation) {
|
|
217
|
-
var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
218
|
-
|
|
219
|
-
{
|
|
220
|
-
checkKeyStringCoercion(key);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
return {
|
|
224
|
-
// This tag allow us to uniquely identify this as a React Portal
|
|
225
|
-
$$typeof: REACT_PORTAL_TYPE,
|
|
226
|
-
key: key == null ? null : '' + key,
|
|
227
|
-
children: children,
|
|
228
|
-
containerInfo: containerInfo,
|
|
229
|
-
implementation: implementation
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
function flushSyncImpl(fn) {
|
|
234
|
-
var previousTransition = ReactSharedInternals.T;
|
|
235
|
-
var previousUpdatePriority = Internals.p;
|
|
236
|
-
/* ReactDOMCurrentUpdatePriority */
|
|
237
|
-
|
|
238
|
-
try {
|
|
239
|
-
ReactSharedInternals.T = null;
|
|
240
|
-
Internals.p
|
|
241
|
-
/* ReactDOMCurrentUpdatePriority */
|
|
242
|
-
= DiscreteEventPriority;
|
|
243
|
-
|
|
244
|
-
if (fn) {
|
|
245
|
-
return fn();
|
|
246
|
-
} else {
|
|
247
|
-
return undefined;
|
|
248
|
-
}
|
|
249
|
-
} finally {
|
|
250
|
-
ReactSharedInternals.T = previousTransition;
|
|
251
|
-
Internals.p
|
|
252
|
-
/* ReactDOMCurrentUpdatePriority */
|
|
253
|
-
= previousUpdatePriority;
|
|
254
|
-
var wasInRender = Internals.d
|
|
255
|
-
/* ReactDOMCurrentDispatcher */
|
|
256
|
-
.f();
|
|
257
|
-
/* flushSyncWork */
|
|
258
|
-
|
|
259
|
-
{
|
|
260
|
-
if (wasInRender) {
|
|
261
|
-
error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
|
|
18
|
+
function createPortal$1(children, containerInfo, implementation) {
|
|
19
|
+
var key =
|
|
20
|
+
3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
|
21
|
+
try {
|
|
22
|
+
testStringCoercion(key);
|
|
23
|
+
var JSCompiler_inline_result = !1;
|
|
24
|
+
} catch (e) {
|
|
25
|
+
JSCompiler_inline_result = !0;
|
|
262
26
|
}
|
|
27
|
+
JSCompiler_inline_result &&
|
|
28
|
+
(console.error(
|
|
29
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
30
|
+
("function" === typeof Symbol &&
|
|
31
|
+
Symbol.toStringTag &&
|
|
32
|
+
key[Symbol.toStringTag]) ||
|
|
33
|
+
key.constructor.name ||
|
|
34
|
+
"Object"
|
|
35
|
+
),
|
|
36
|
+
testStringCoercion(key));
|
|
37
|
+
return {
|
|
38
|
+
$$typeof: REACT_PORTAL_TYPE,
|
|
39
|
+
key: null == key ? null : "" + key,
|
|
40
|
+
children: children,
|
|
41
|
+
containerInfo: containerInfo,
|
|
42
|
+
implementation: implementation
|
|
43
|
+
};
|
|
263
44
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
function getCrossOriginString(input) {
|
|
270
|
-
if (typeof input === 'string') {
|
|
271
|
-
return input === 'use-credentials' ? input : '';
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return undefined;
|
|
275
|
-
}
|
|
276
|
-
function getCrossOriginStringAs(as, input) {
|
|
277
|
-
if (as === 'font') {
|
|
278
|
-
return '';
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
if (typeof input === 'string') {
|
|
282
|
-
return input === 'use-credentials' ? input : '';
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
return undefined;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function prefetchDNS(href) {
|
|
289
|
-
{
|
|
290
|
-
if (typeof href !== 'string' || !href) {
|
|
291
|
-
error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
|
|
292
|
-
} else if (arguments.length > 1) {
|
|
293
|
-
var options = arguments[1];
|
|
294
|
-
|
|
295
|
-
if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {
|
|
296
|
-
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
|
|
297
|
-
} else {
|
|
298
|
-
error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));
|
|
299
|
-
}
|
|
45
|
+
function getCrossOriginStringAs(as, input) {
|
|
46
|
+
if ("font" === as) return "";
|
|
47
|
+
if ("string" === typeof input)
|
|
48
|
+
return "use-credentials" === input ? input : "";
|
|
300
49
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
|
|
310
|
-
// and the runtime may not be capable of responding. The function is optimistic and not critical
|
|
311
|
-
// so we favor silent bailout over warning or erroring.
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
function preconnect(href, options) {
|
|
315
|
-
{
|
|
316
|
-
if (typeof href !== 'string' || !href) {
|
|
317
|
-
error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
|
|
318
|
-
} else if (options != null && typeof options !== 'object') {
|
|
319
|
-
error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));
|
|
320
|
-
} else if (options != null && typeof options.crossOrigin !== 'string') {
|
|
321
|
-
error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));
|
|
50
|
+
function getValueDescriptorExpectingObjectForWarning(thing) {
|
|
51
|
+
return null === thing
|
|
52
|
+
? "`null`"
|
|
53
|
+
: void 0 === thing
|
|
54
|
+
? "`undefined`"
|
|
55
|
+
: "" === thing
|
|
56
|
+
? "an empty string"
|
|
57
|
+
: 'something with type "' + typeof thing + '"';
|
|
322
58
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
function preload(href, options) {
|
|
338
|
-
{
|
|
339
|
-
var encountered = '';
|
|
340
|
-
|
|
341
|
-
if (typeof href !== 'string' || !href) {
|
|
342
|
-
encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".";
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (options == null || typeof options !== 'object') {
|
|
346
|
-
encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + ".";
|
|
347
|
-
} else if (typeof options.as !== 'string' || !options.as) {
|
|
348
|
-
encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".";
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
if (encountered) {
|
|
352
|
-
error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s', encountered);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
if (typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type
|
|
357
|
-
typeof options === 'object' && options !== null && typeof options.as === 'string') {
|
|
358
|
-
var as = options.as;
|
|
359
|
-
var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
|
|
360
|
-
Internals.d
|
|
361
|
-
/* ReactDOMCurrentDispatcher */
|
|
362
|
-
.L(
|
|
363
|
-
/* preload */
|
|
364
|
-
href, as, {
|
|
365
|
-
crossOrigin: crossOrigin,
|
|
366
|
-
integrity: typeof options.integrity === 'string' ? options.integrity : undefined,
|
|
367
|
-
nonce: typeof options.nonce === 'string' ? options.nonce : undefined,
|
|
368
|
-
type: typeof options.type === 'string' ? options.type : undefined,
|
|
369
|
-
fetchPriority: typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined,
|
|
370
|
-
referrerPolicy: typeof options.referrerPolicy === 'string' ? options.referrerPolicy : undefined,
|
|
371
|
-
imageSrcSet: typeof options.imageSrcSet === 'string' ? options.imageSrcSet : undefined,
|
|
372
|
-
imageSizes: typeof options.imageSizes === 'string' ? options.imageSizes : undefined,
|
|
373
|
-
media: typeof options.media === 'string' ? options.media : undefined
|
|
374
|
-
});
|
|
375
|
-
} // We don't error because preload needs to be resilient to being called in a variety of scopes
|
|
376
|
-
// and the runtime may not be capable of responding. The function is optimistic and not critical
|
|
377
|
-
// so we favor silent bailout over warning or erroring.
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
function preloadModule(href, options) {
|
|
381
|
-
{
|
|
382
|
-
var encountered = '';
|
|
383
|
-
|
|
384
|
-
if (typeof href !== 'string' || !href) {
|
|
385
|
-
encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".";
|
|
59
|
+
function getValueDescriptorExpectingEnumForWarning(thing) {
|
|
60
|
+
return null === thing
|
|
61
|
+
? "`null`"
|
|
62
|
+
: void 0 === thing
|
|
63
|
+
? "`undefined`"
|
|
64
|
+
: "" === thing
|
|
65
|
+
? "an empty string"
|
|
66
|
+
: "string" === typeof thing
|
|
67
|
+
? JSON.stringify(thing)
|
|
68
|
+
: "number" === typeof thing
|
|
69
|
+
? "`" + thing + "`"
|
|
70
|
+
: 'something with type "' + typeof thing + '"';
|
|
386
71
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
72
|
+
function resolveDispatcher() {
|
|
73
|
+
var dispatcher = ReactSharedInternals.H;
|
|
74
|
+
null === dispatcher &&
|
|
75
|
+
console.error(
|
|
76
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
77
|
+
);
|
|
78
|
+
return dispatcher;
|
|
392
79
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
function
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
integrity: integrity,
|
|
458
|
-
fetchPriority: fetchPriority,
|
|
459
|
-
nonce: typeof options.nonce === 'string' ? options.nonce : undefined
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
} // We don't error because preinit needs to be resilient to being called in a variety of scopes
|
|
463
|
-
// and the runtime may not be capable of responding. The function is optimistic and not critical
|
|
464
|
-
// so we favor silent bailout over warning or erroring.
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
function preinitModule(href, options) {
|
|
468
|
-
{
|
|
469
|
-
var encountered = '';
|
|
470
|
-
|
|
471
|
-
if (typeof href !== 'string' || !href) {
|
|
472
|
-
encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".";
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
if (options !== undefined && typeof options !== 'object') {
|
|
476
|
-
encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + ".";
|
|
477
|
-
} else if (options && 'as' in options && options.as !== 'script') {
|
|
478
|
-
encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".";
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
if (encountered) {
|
|
482
|
-
error('ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s', encountered);
|
|
483
|
-
} else {
|
|
484
|
-
var as = options && typeof options.as === 'string' ? options.as : 'script';
|
|
485
|
-
|
|
486
|
-
switch (as) {
|
|
487
|
-
case 'script':
|
|
488
|
-
{
|
|
489
|
-
break;
|
|
490
|
-
}
|
|
491
|
-
// We have an invalid as type and need to warn
|
|
492
|
-
|
|
493
|
-
default:
|
|
494
|
-
{
|
|
495
|
-
var typeOfAs = getValueDescriptorExpectingEnumForWarning(as);
|
|
496
|
-
|
|
497
|
-
error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script"' + ' but received "%s" instead. This warning was generated for `href` "%s". In the future other' + ' module types will be supported, aligning with the import-attributes proposal. Learn more here:' + ' (https://github.com/tc39/proposal-import-attributes)', typeOfAs, href);
|
|
498
|
-
}
|
|
80
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
81
|
+
"function" ===
|
|
82
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
|
|
83
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
84
|
+
var React = require("react"),
|
|
85
|
+
Internals = {
|
|
86
|
+
d: {
|
|
87
|
+
f: noop,
|
|
88
|
+
r: function () {
|
|
89
|
+
throw Error(
|
|
90
|
+
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
D: noop,
|
|
94
|
+
C: noop,
|
|
95
|
+
L: noop,
|
|
96
|
+
m: noop,
|
|
97
|
+
X: noop,
|
|
98
|
+
S: noop,
|
|
99
|
+
M: noop
|
|
100
|
+
},
|
|
101
|
+
p: 0,
|
|
102
|
+
findDOMNode: null
|
|
103
|
+
},
|
|
104
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
105
|
+
ReactSharedInternals =
|
|
106
|
+
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
107
|
+
("function" === typeof Map &&
|
|
108
|
+
null != Map.prototype &&
|
|
109
|
+
"function" === typeof Map.prototype.forEach &&
|
|
110
|
+
"function" === typeof Set &&
|
|
111
|
+
null != Set.prototype &&
|
|
112
|
+
"function" === typeof Set.prototype.clear &&
|
|
113
|
+
"function" === typeof Set.prototype.forEach) ||
|
|
114
|
+
console.error(
|
|
115
|
+
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
|
|
116
|
+
);
|
|
117
|
+
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|
118
|
+
Internals;
|
|
119
|
+
exports.createPortal = function (children, container) {
|
|
120
|
+
var key =
|
|
121
|
+
2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
|
|
122
|
+
if (
|
|
123
|
+
!container ||
|
|
124
|
+
(1 !== container.nodeType &&
|
|
125
|
+
9 !== container.nodeType &&
|
|
126
|
+
11 !== container.nodeType)
|
|
127
|
+
)
|
|
128
|
+
throw Error("Target container is not a DOM element.");
|
|
129
|
+
return createPortal$1(children, container, null, key);
|
|
130
|
+
};
|
|
131
|
+
exports.flushSync = function (fn) {
|
|
132
|
+
var previousTransition = ReactSharedInternals.T,
|
|
133
|
+
previousUpdatePriority = Internals.p;
|
|
134
|
+
try {
|
|
135
|
+
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
|
|
136
|
+
return fn();
|
|
137
|
+
} finally {
|
|
138
|
+
(ReactSharedInternals.T = previousTransition),
|
|
139
|
+
(Internals.p = previousUpdatePriority),
|
|
140
|
+
Internals.d.f() &&
|
|
141
|
+
console.error(
|
|
142
|
+
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
|
|
143
|
+
);
|
|
499
144
|
}
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
145
|
+
};
|
|
146
|
+
exports.preconnect = function (href, options) {
|
|
147
|
+
"string" === typeof href && href
|
|
148
|
+
? null != options && "object" !== typeof options
|
|
149
|
+
? console.error(
|
|
150
|
+
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
|
|
151
|
+
getValueDescriptorExpectingEnumForWarning(options)
|
|
152
|
+
)
|
|
153
|
+
: null != options &&
|
|
154
|
+
"string" !== typeof options.crossOrigin &&
|
|
155
|
+
console.error(
|
|
156
|
+
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
|
|
157
|
+
getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
|
|
158
|
+
)
|
|
159
|
+
: console.error(
|
|
160
|
+
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
161
|
+
getValueDescriptorExpectingObjectForWarning(href)
|
|
162
|
+
);
|
|
163
|
+
"string" === typeof href &&
|
|
164
|
+
(options
|
|
165
|
+
? ((options = options.crossOrigin),
|
|
166
|
+
(options =
|
|
167
|
+
"string" === typeof options
|
|
168
|
+
? "use-credentials" === options
|
|
169
|
+
? options
|
|
170
|
+
: ""
|
|
171
|
+
: void 0))
|
|
172
|
+
: (options = null),
|
|
173
|
+
Internals.d.C(href, options));
|
|
174
|
+
};
|
|
175
|
+
exports.prefetchDNS = function (href) {
|
|
176
|
+
if ("string" !== typeof href || !href)
|
|
177
|
+
console.error(
|
|
178
|
+
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
179
|
+
getValueDescriptorExpectingObjectForWarning(href)
|
|
180
|
+
);
|
|
181
|
+
else if (1 < arguments.length) {
|
|
182
|
+
var options = arguments[1];
|
|
183
|
+
"object" === typeof options && options.hasOwnProperty("crossOrigin")
|
|
184
|
+
? console.error(
|
|
185
|
+
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
186
|
+
getValueDescriptorExpectingEnumForWarning(options)
|
|
187
|
+
)
|
|
188
|
+
: console.error(
|
|
189
|
+
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
190
|
+
getValueDescriptorExpectingEnumForWarning(options)
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
"string" === typeof href && Internals.d.D(href);
|
|
194
|
+
};
|
|
195
|
+
exports.preinit = function (href, options) {
|
|
196
|
+
"string" === typeof href && href
|
|
197
|
+
? null == options || "object" !== typeof options
|
|
198
|
+
? console.error(
|
|
199
|
+
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
|
|
200
|
+
getValueDescriptorExpectingEnumForWarning(options)
|
|
201
|
+
)
|
|
202
|
+
: "style" !== options.as &&
|
|
203
|
+
"script" !== options.as &&
|
|
204
|
+
console.error(
|
|
205
|
+
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
|
|
206
|
+
getValueDescriptorExpectingEnumForWarning(options.as)
|
|
207
|
+
)
|
|
208
|
+
: console.error(
|
|
209
|
+
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
210
|
+
getValueDescriptorExpectingObjectForWarning(href)
|
|
211
|
+
);
|
|
212
|
+
if (
|
|
213
|
+
"string" === typeof href &&
|
|
214
|
+
options &&
|
|
215
|
+
"string" === typeof options.as
|
|
216
|
+
) {
|
|
217
|
+
var as = options.as,
|
|
218
|
+
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
|
|
219
|
+
integrity =
|
|
220
|
+
"string" === typeof options.integrity ? options.integrity : void 0,
|
|
221
|
+
fetchPriority =
|
|
222
|
+
"string" === typeof options.fetchPriority
|
|
223
|
+
? options.fetchPriority
|
|
224
|
+
: void 0;
|
|
225
|
+
"style" === as
|
|
226
|
+
? Internals.d.S(
|
|
227
|
+
href,
|
|
228
|
+
"string" === typeof options.precedence
|
|
229
|
+
? options.precedence
|
|
230
|
+
: void 0,
|
|
231
|
+
{
|
|
232
|
+
crossOrigin: crossOrigin,
|
|
233
|
+
integrity: integrity,
|
|
234
|
+
fetchPriority: fetchPriority
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
: "script" === as &&
|
|
238
|
+
Internals.d.X(href, {
|
|
239
|
+
crossOrigin: crossOrigin,
|
|
240
|
+
integrity: integrity,
|
|
241
|
+
fetchPriority: fetchPriority,
|
|
242
|
+
nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
exports.preinitModule = function (href, options) {
|
|
247
|
+
var encountered = "";
|
|
248
|
+
("string" === typeof href && href) ||
|
|
249
|
+
(encountered +=
|
|
250
|
+
" The `href` argument encountered was " +
|
|
251
|
+
getValueDescriptorExpectingObjectForWarning(href) +
|
|
252
|
+
".");
|
|
253
|
+
void 0 !== options && "object" !== typeof options
|
|
254
|
+
? (encountered +=
|
|
255
|
+
" The `options` argument encountered was " +
|
|
256
|
+
getValueDescriptorExpectingObjectForWarning(options) +
|
|
257
|
+
".")
|
|
258
|
+
: options &&
|
|
259
|
+
"as" in options &&
|
|
260
|
+
"script" !== options.as &&
|
|
261
|
+
(encountered +=
|
|
262
|
+
" The `as` option encountered was " +
|
|
263
|
+
getValueDescriptorExpectingEnumForWarning(options.as) +
|
|
264
|
+
".");
|
|
265
|
+
if (encountered)
|
|
266
|
+
console.error(
|
|
267
|
+
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
|
|
268
|
+
encountered
|
|
269
|
+
);
|
|
270
|
+
else
|
|
271
|
+
switch (
|
|
272
|
+
((encountered =
|
|
273
|
+
options && "string" === typeof options.as ? options.as : "script"),
|
|
274
|
+
encountered)
|
|
275
|
+
) {
|
|
276
|
+
case "script":
|
|
277
|
+
break;
|
|
278
|
+
default:
|
|
279
|
+
(encountered =
|
|
280
|
+
getValueDescriptorExpectingEnumForWarning(encountered)),
|
|
281
|
+
console.error(
|
|
282
|
+
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
|
|
283
|
+
encountered,
|
|
284
|
+
href
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
if ("string" === typeof href)
|
|
288
|
+
if ("object" === typeof options && null !== options) {
|
|
289
|
+
if (null == options.as || "script" === options.as)
|
|
290
|
+
(encountered = getCrossOriginStringAs(
|
|
291
|
+
options.as,
|
|
292
|
+
options.crossOrigin
|
|
293
|
+
)),
|
|
294
|
+
Internals.d.M(href, {
|
|
295
|
+
crossOrigin: encountered,
|
|
296
|
+
integrity:
|
|
297
|
+
"string" === typeof options.integrity
|
|
298
|
+
? options.integrity
|
|
299
|
+
: void 0,
|
|
300
|
+
nonce:
|
|
301
|
+
"string" === typeof options.nonce ? options.nonce : void 0
|
|
302
|
+
});
|
|
303
|
+
} else null == options && Internals.d.M(href);
|
|
304
|
+
};
|
|
305
|
+
exports.preload = function (href, options) {
|
|
306
|
+
var encountered = "";
|
|
307
|
+
("string" === typeof href && href) ||
|
|
308
|
+
(encountered +=
|
|
309
|
+
" The `href` argument encountered was " +
|
|
310
|
+
getValueDescriptorExpectingObjectForWarning(href) +
|
|
311
|
+
".");
|
|
312
|
+
null == options || "object" !== typeof options
|
|
313
|
+
? (encountered +=
|
|
314
|
+
" The `options` argument encountered was " +
|
|
315
|
+
getValueDescriptorExpectingObjectForWarning(options) +
|
|
316
|
+
".")
|
|
317
|
+
: ("string" === typeof options.as && options.as) ||
|
|
318
|
+
(encountered +=
|
|
319
|
+
" The `as` option encountered was " +
|
|
320
|
+
getValueDescriptorExpectingObjectForWarning(options.as) +
|
|
321
|
+
".");
|
|
322
|
+
encountered &&
|
|
323
|
+
console.error(
|
|
324
|
+
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
|
|
325
|
+
encountered
|
|
326
|
+
);
|
|
327
|
+
if (
|
|
328
|
+
"string" === typeof href &&
|
|
329
|
+
"object" === typeof options &&
|
|
330
|
+
null !== options &&
|
|
331
|
+
"string" === typeof options.as
|
|
332
|
+
) {
|
|
333
|
+
encountered = options.as;
|
|
334
|
+
var crossOrigin = getCrossOriginStringAs(
|
|
335
|
+
encountered,
|
|
336
|
+
options.crossOrigin
|
|
337
|
+
);
|
|
338
|
+
Internals.d.L(href, encountered, {
|
|
512
339
|
crossOrigin: crossOrigin,
|
|
513
|
-
integrity:
|
|
514
|
-
|
|
340
|
+
integrity:
|
|
341
|
+
"string" === typeof options.integrity ? options.integrity : void 0,
|
|
342
|
+
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
|
|
343
|
+
type: "string" === typeof options.type ? options.type : void 0,
|
|
344
|
+
fetchPriority:
|
|
345
|
+
"string" === typeof options.fetchPriority
|
|
346
|
+
? options.fetchPriority
|
|
347
|
+
: void 0,
|
|
348
|
+
referrerPolicy:
|
|
349
|
+
"string" === typeof options.referrerPolicy
|
|
350
|
+
? options.referrerPolicy
|
|
351
|
+
: void 0,
|
|
352
|
+
imageSrcSet:
|
|
353
|
+
"string" === typeof options.imageSrcSet
|
|
354
|
+
? options.imageSrcSet
|
|
355
|
+
: void 0,
|
|
356
|
+
imageSizes:
|
|
357
|
+
"string" === typeof options.imageSizes
|
|
358
|
+
? options.imageSizes
|
|
359
|
+
: void 0,
|
|
360
|
+
media: "string" === typeof options.media ? options.media : void 0
|
|
515
361
|
});
|
|
516
362
|
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
if (typeof Map !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Map has no prototype
|
|
579
|
-
Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Set has no prototype
|
|
580
|
-
Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
|
|
581
|
-
error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
function batchedUpdates(fn, a) {
|
|
586
|
-
// batchedUpdates is now just a passthrough noop
|
|
587
|
-
return fn(a);
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
function createPortal(children, container) {
|
|
591
|
-
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
592
|
-
|
|
593
|
-
if (!isValidContainer(container)) {
|
|
594
|
-
throw new Error('Target container is not a DOM element.');
|
|
595
|
-
} // TODO: pass ReactDOM portal implementation as third argument
|
|
596
|
-
// $FlowFixMe[incompatible-return] The Flow type is opaque but there's no way to actually create it.
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
return createPortal$1(children, container, null, key);
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
|
|
603
|
-
exports.createPortal = createPortal;
|
|
604
|
-
exports.flushSync = flushSync;
|
|
605
|
-
exports.preconnect = preconnect;
|
|
606
|
-
exports.prefetchDNS = prefetchDNS;
|
|
607
|
-
exports.preinit = preinit;
|
|
608
|
-
exports.preinitModule = preinitModule;
|
|
609
|
-
exports.preload = preload;
|
|
610
|
-
exports.preloadModule = preloadModule;
|
|
611
|
-
exports.requestFormReset = requestFormReset;
|
|
612
|
-
exports.unstable_batchedUpdates = batchedUpdates;
|
|
613
|
-
exports.useFormState = useFormState;
|
|
614
|
-
exports.useFormStatus = useFormStatus;
|
|
615
|
-
exports.version = ReactVersion;
|
|
616
|
-
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
617
|
-
if (
|
|
618
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
619
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
|
|
620
|
-
'function'
|
|
621
|
-
) {
|
|
622
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
623
|
-
}
|
|
624
|
-
|
|
363
|
+
};
|
|
364
|
+
exports.preloadModule = function (href, options) {
|
|
365
|
+
var encountered = "";
|
|
366
|
+
("string" === typeof href && href) ||
|
|
367
|
+
(encountered +=
|
|
368
|
+
" The `href` argument encountered was " +
|
|
369
|
+
getValueDescriptorExpectingObjectForWarning(href) +
|
|
370
|
+
".");
|
|
371
|
+
void 0 !== options && "object" !== typeof options
|
|
372
|
+
? (encountered +=
|
|
373
|
+
" The `options` argument encountered was " +
|
|
374
|
+
getValueDescriptorExpectingObjectForWarning(options) +
|
|
375
|
+
".")
|
|
376
|
+
: options &&
|
|
377
|
+
"as" in options &&
|
|
378
|
+
"string" !== typeof options.as &&
|
|
379
|
+
(encountered +=
|
|
380
|
+
" The `as` option encountered was " +
|
|
381
|
+
getValueDescriptorExpectingObjectForWarning(options.as) +
|
|
382
|
+
".");
|
|
383
|
+
encountered &&
|
|
384
|
+
console.error(
|
|
385
|
+
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
|
|
386
|
+
encountered
|
|
387
|
+
);
|
|
388
|
+
"string" === typeof href &&
|
|
389
|
+
(options
|
|
390
|
+
? ((encountered = getCrossOriginStringAs(
|
|
391
|
+
options.as,
|
|
392
|
+
options.crossOrigin
|
|
393
|
+
)),
|
|
394
|
+
Internals.d.m(href, {
|
|
395
|
+
as:
|
|
396
|
+
"string" === typeof options.as && "script" !== options.as
|
|
397
|
+
? options.as
|
|
398
|
+
: void 0,
|
|
399
|
+
crossOrigin: encountered,
|
|
400
|
+
integrity:
|
|
401
|
+
"string" === typeof options.integrity
|
|
402
|
+
? options.integrity
|
|
403
|
+
: void 0
|
|
404
|
+
}))
|
|
405
|
+
: Internals.d.m(href));
|
|
406
|
+
};
|
|
407
|
+
exports.requestFormReset = function (form) {
|
|
408
|
+
Internals.d.r(form);
|
|
409
|
+
};
|
|
410
|
+
exports.unstable_batchedUpdates = function (fn, a) {
|
|
411
|
+
return fn(a);
|
|
412
|
+
};
|
|
413
|
+
exports.useFormState = function (action, initialState, permalink) {
|
|
414
|
+
return resolveDispatcher().useFormState(action, initialState, permalink);
|
|
415
|
+
};
|
|
416
|
+
exports.useFormStatus = function () {
|
|
417
|
+
return resolveDispatcher().useHostTransitionStatus();
|
|
418
|
+
};
|
|
419
|
+
exports.version = "19.2.0-canary-5252281c-20250408";
|
|
420
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
421
|
+
"function" ===
|
|
422
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
|
423
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
625
424
|
})();
|
|
626
|
-
}
|