@0xsquid/ui 0.2.0 → 1.0.0

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/dist/cjs/index.js CHANGED
@@ -1,7 +1,4193 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var react = require('react');
3
+ /******************************************************************************
4
+ Copyright (c) Microsoft Corporation.
5
+
6
+ Permission to use, copy, modify, and/or distribute this software for any
7
+ purpose with or without fee is hereby granted.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
16
+ ***************************************************************************** */
17
+ /* global Reflect, Promise, SuppressedError, Symbol */
18
+
19
+
20
+ function __rest(s, e) {
21
+ var t = {};
22
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23
+ t[p] = s[p];
24
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
25
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
26
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
27
+ t[p[i]] = s[p[i]];
28
+ }
29
+ return t;
30
+ }
31
+
32
+ function __awaiter(thisArg, _arguments, P, generator) {
33
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
+ return new (P || (P = Promise))(function (resolve, reject) {
35
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
37
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
39
+ });
40
+ }
41
+
42
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
43
+ var e = new Error(message);
44
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
45
+ };
46
+
47
+ var jsxRuntime = {exports: {}};
48
+
49
+ var reactJsxRuntime_production_min = {};
50
+
51
+ var react = {exports: {}};
52
+
53
+ var react_production_min = {};
54
+
55
+ /**
56
+ * @license React
57
+ * react.production.min.js
58
+ *
59
+ * Copyright (c) Facebook, Inc. and its affiliates.
60
+ *
61
+ * This source code is licensed under the MIT license found in the
62
+ * LICENSE file in the root directory of this source tree.
63
+ */
64
+
65
+ var hasRequiredReact_production_min;
66
+
67
+ function requireReact_production_min () {
68
+ if (hasRequiredReact_production_min) return react_production_min;
69
+ hasRequiredReact_production_min = 1;
70
+ var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return "function"===typeof a?a:null}
71
+ var B={isMounted:function(){return !1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B;}E.prototype.isReactComponent={};
72
+ E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState");};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate");};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B;}var H=G.prototype=new F;
73
+ H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};
74
+ function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f;}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return {$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}
75
+ function N(a,b){return {$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return "object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return "$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return "object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
76
+ function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0;}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k=
77
+ a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c);}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}
78
+ function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b;},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b;});-1===a._status&&(a._status=0,a._result=b);}if(1===a._status)return a._result.default;throw a._result;}
79
+ var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};react_production_min.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments);},e);},count:function(a){var b=0;S(a,function(){b++;});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};react_production_min.Component=E;react_production_min.Fragment=p;
80
+ react_production_min.Profiler=r;react_production_min.PureComponent=G;react_production_min.StrictMode=q;react_production_min.Suspense=w;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;
81
+ react_production_min.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f]);}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);
82
+ for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g;}return {$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};react_production_min.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};react_production_min.createElement=M;react_production_min.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};react_production_min.createRef=function(){return {current:null}};
83
+ react_production_min.forwardRef=function(a){return {$$typeof:v,render:a}};react_production_min.isValidElement=O;react_production_min.lazy=function(a){return {$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};react_production_min.memo=function(a,b){return {$$typeof:x,type:a,compare:void 0===b?null:b}};react_production_min.startTransition=function(a){var b=V.transition;V.transition={};try{a();}finally{V.transition=b;}};react_production_min.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};
84
+ react_production_min.useCallback=function(a,b){return U.current.useCallback(a,b)};react_production_min.useContext=function(a){return U.current.useContext(a)};react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(a){return U.current.useDeferredValue(a)};react_production_min.useEffect=function(a,b){return U.current.useEffect(a,b)};react_production_min.useId=function(){return U.current.useId()};react_production_min.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};
85
+ react_production_min.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};react_production_min.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};react_production_min.useMemo=function(a,b){return U.current.useMemo(a,b)};react_production_min.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};react_production_min.useRef=function(a){return U.current.useRef(a)};react_production_min.useState=function(a){return U.current.useState(a)};react_production_min.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};
86
+ react_production_min.useTransition=function(){return U.current.useTransition()};react_production_min.version="18.2.0";
87
+ return react_production_min;
88
+ }
89
+
90
+ var react_development = {exports: {}};
91
+
92
+ /**
93
+ * @license React
94
+ * react.development.js
95
+ *
96
+ * Copyright (c) Facebook, Inc. and its affiliates.
97
+ *
98
+ * This source code is licensed under the MIT license found in the
99
+ * LICENSE file in the root directory of this source tree.
100
+ */
101
+ react_development.exports;
102
+
103
+ var hasRequiredReact_development;
104
+
105
+ function requireReact_development () {
106
+ if (hasRequiredReact_development) return react_development.exports;
107
+ hasRequiredReact_development = 1;
108
+ (function (module, exports) {
109
+
110
+ if (process.env.NODE_ENV !== "production") {
111
+ (function() {
112
+
113
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
114
+ if (
115
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
116
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
117
+ 'function'
118
+ ) {
119
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
120
+ }
121
+ var ReactVersion = '18.2.0';
122
+
123
+ // ATTENTION
124
+ // When adding new symbols to this file,
125
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
126
+ // The Symbol used to tag the ReactElement-like types.
127
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
128
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
129
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
130
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
131
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
132
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
133
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
134
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
135
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
136
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
137
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
138
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
139
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
140
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
141
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
142
+ function getIteratorFn(maybeIterable) {
143
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
144
+ return null;
145
+ }
146
+
147
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
148
+
149
+ if (typeof maybeIterator === 'function') {
150
+ return maybeIterator;
151
+ }
152
+
153
+ return null;
154
+ }
155
+
156
+ /**
157
+ * Keeps track of the current dispatcher.
158
+ */
159
+ var ReactCurrentDispatcher = {
160
+ /**
161
+ * @internal
162
+ * @type {ReactComponent}
163
+ */
164
+ current: null
165
+ };
166
+
167
+ /**
168
+ * Keeps track of the current batch's configuration such as how long an update
169
+ * should suspend for if it needs to.
170
+ */
171
+ var ReactCurrentBatchConfig = {
172
+ transition: null
173
+ };
174
+
175
+ var ReactCurrentActQueue = {
176
+ current: null,
177
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode.
178
+ isBatchingLegacy: false,
179
+ didScheduleLegacyUpdate: false
180
+ };
181
+
182
+ /**
183
+ * Keeps track of the current owner.
184
+ *
185
+ * The current owner is the component who should own any components that are
186
+ * currently being constructed.
187
+ */
188
+ var ReactCurrentOwner = {
189
+ /**
190
+ * @internal
191
+ * @type {ReactComponent}
192
+ */
193
+ current: null
194
+ };
195
+
196
+ var ReactDebugCurrentFrame = {};
197
+ var currentExtraStackFrame = null;
198
+ function setExtraStackFrame(stack) {
199
+ {
200
+ currentExtraStackFrame = stack;
201
+ }
202
+ }
203
+
204
+ {
205
+ ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
206
+ {
207
+ currentExtraStackFrame = stack;
208
+ }
209
+ }; // Stack implementation injected by the current renderer.
210
+
211
+
212
+ ReactDebugCurrentFrame.getCurrentStack = null;
213
+
214
+ ReactDebugCurrentFrame.getStackAddendum = function () {
215
+ var stack = ''; // Add an extra top frame while an element is being validated
216
+
217
+ if (currentExtraStackFrame) {
218
+ stack += currentExtraStackFrame;
219
+ } // Delegate to the injected renderer-specific implementation
220
+
221
+
222
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
223
+
224
+ if (impl) {
225
+ stack += impl() || '';
226
+ }
227
+
228
+ return stack;
229
+ };
230
+ }
231
+
232
+ // -----------------------------------------------------------------------------
233
+
234
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
235
+ var enableCacheElement = false;
236
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
237
+
238
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
239
+ // stuff. Intended to enable React core members to more easily debug scheduling
240
+ // issues in DEV builds.
241
+
242
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
243
+
244
+ var ReactSharedInternals = {
245
+ ReactCurrentDispatcher: ReactCurrentDispatcher,
246
+ ReactCurrentBatchConfig: ReactCurrentBatchConfig,
247
+ ReactCurrentOwner: ReactCurrentOwner
248
+ };
249
+
250
+ {
251
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
252
+ ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
253
+ }
254
+
255
+ // by calls to these methods by a Babel plugin.
256
+ //
257
+ // In PROD (or in packages without access to React internals),
258
+ // they are left as they are instead.
259
+
260
+ function warn(format) {
261
+ {
262
+ {
263
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
264
+ args[_key - 1] = arguments[_key];
265
+ }
266
+
267
+ printWarning('warn', format, args);
268
+ }
269
+ }
270
+ }
271
+ function error(format) {
272
+ {
273
+ {
274
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
275
+ args[_key2 - 1] = arguments[_key2];
276
+ }
277
+
278
+ printWarning('error', format, args);
279
+ }
280
+ }
281
+ }
282
+
283
+ function printWarning(level, format, args) {
284
+ // When changing this logic, you might want to also
285
+ // update consoleWithStackDev.www.js as well.
286
+ {
287
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
288
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
289
+
290
+ if (stack !== '') {
291
+ format += '%s';
292
+ args = args.concat([stack]);
293
+ } // eslint-disable-next-line react-internal/safe-string-coercion
294
+
295
+
296
+ var argsWithFormat = args.map(function (item) {
297
+ return String(item);
298
+ }); // Careful: RN currently depends on this prefix
299
+
300
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
301
+ // breaks IE9: https://github.com/facebook/react/issues/13610
302
+ // eslint-disable-next-line react-internal/no-production-logging
303
+
304
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
305
+ }
306
+ }
307
+
308
+ var didWarnStateUpdateForUnmountedComponent = {};
309
+
310
+ function warnNoop(publicInstance, callerName) {
311
+ {
312
+ var _constructor = publicInstance.constructor;
313
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
314
+ var warningKey = componentName + "." + callerName;
315
+
316
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
317
+ return;
318
+ }
319
+
320
+ error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
321
+
322
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
323
+ }
324
+ }
325
+ /**
326
+ * This is the abstract API for an update queue.
327
+ */
328
+
329
+
330
+ var ReactNoopUpdateQueue = {
331
+ /**
332
+ * Checks whether or not this composite component is mounted.
333
+ * @param {ReactClass} publicInstance The instance we want to test.
334
+ * @return {boolean} True if mounted, false otherwise.
335
+ * @protected
336
+ * @final
337
+ */
338
+ isMounted: function (publicInstance) {
339
+ return false;
340
+ },
341
+
342
+ /**
343
+ * Forces an update. This should only be invoked when it is known with
344
+ * certainty that we are **not** in a DOM transaction.
345
+ *
346
+ * You may want to call this when you know that some deeper aspect of the
347
+ * component's state has changed but `setState` was not called.
348
+ *
349
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
350
+ * `componentWillUpdate` and `componentDidUpdate`.
351
+ *
352
+ * @param {ReactClass} publicInstance The instance that should rerender.
353
+ * @param {?function} callback Called after component is updated.
354
+ * @param {?string} callerName name of the calling function in the public API.
355
+ * @internal
356
+ */
357
+ enqueueForceUpdate: function (publicInstance, callback, callerName) {
358
+ warnNoop(publicInstance, 'forceUpdate');
359
+ },
360
+
361
+ /**
362
+ * Replaces all of the state. Always use this or `setState` to mutate state.
363
+ * You should treat `this.state` as immutable.
364
+ *
365
+ * There is no guarantee that `this.state` will be immediately updated, so
366
+ * accessing `this.state` after calling this method may return the old value.
367
+ *
368
+ * @param {ReactClass} publicInstance The instance that should rerender.
369
+ * @param {object} completeState Next state.
370
+ * @param {?function} callback Called after component is updated.
371
+ * @param {?string} callerName name of the calling function in the public API.
372
+ * @internal
373
+ */
374
+ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
375
+ warnNoop(publicInstance, 'replaceState');
376
+ },
377
+
378
+ /**
379
+ * Sets a subset of the state. This only exists because _pendingState is
380
+ * internal. This provides a merging strategy that is not available to deep
381
+ * properties which is confusing. TODO: Expose pendingState or don't use it
382
+ * during the merge.
383
+ *
384
+ * @param {ReactClass} publicInstance The instance that should rerender.
385
+ * @param {object} partialState Next partial state to be merged with state.
386
+ * @param {?function} callback Called after component is updated.
387
+ * @param {?string} Name of the calling function in the public API.
388
+ * @internal
389
+ */
390
+ enqueueSetState: function (publicInstance, partialState, callback, callerName) {
391
+ warnNoop(publicInstance, 'setState');
392
+ }
393
+ };
394
+
395
+ var assign = Object.assign;
396
+
397
+ var emptyObject = {};
398
+
399
+ {
400
+ Object.freeze(emptyObject);
401
+ }
402
+ /**
403
+ * Base class helpers for the updating state of a component.
404
+ */
405
+
406
+
407
+ function Component(props, context, updater) {
408
+ this.props = props;
409
+ this.context = context; // If a component has string refs, we will assign a different object later.
410
+
411
+ this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
412
+ // renderer.
413
+
414
+ this.updater = updater || ReactNoopUpdateQueue;
415
+ }
416
+
417
+ Component.prototype.isReactComponent = {};
418
+ /**
419
+ * Sets a subset of the state. Always use this to mutate
420
+ * state. You should treat `this.state` as immutable.
421
+ *
422
+ * There is no guarantee that `this.state` will be immediately updated, so
423
+ * accessing `this.state` after calling this method may return the old value.
424
+ *
425
+ * There is no guarantee that calls to `setState` will run synchronously,
426
+ * as they may eventually be batched together. You can provide an optional
427
+ * callback that will be executed when the call to setState is actually
428
+ * completed.
429
+ *
430
+ * When a function is provided to setState, it will be called at some point in
431
+ * the future (not synchronously). It will be called with the up to date
432
+ * component arguments (state, props, context). These values can be different
433
+ * from this.* because your function may be called after receiveProps but before
434
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
435
+ * assigned to this.
436
+ *
437
+ * @param {object|function} partialState Next partial state or function to
438
+ * produce next partial state to be merged with current state.
439
+ * @param {?function} callback Called after state is updated.
440
+ * @final
441
+ * @protected
442
+ */
443
+
444
+ Component.prototype.setState = function (partialState, callback) {
445
+ if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
446
+ throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
447
+ }
448
+
449
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
450
+ };
451
+ /**
452
+ * Forces an update. This should only be invoked when it is known with
453
+ * certainty that we are **not** in a DOM transaction.
454
+ *
455
+ * You may want to call this when you know that some deeper aspect of the
456
+ * component's state has changed but `setState` was not called.
457
+ *
458
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
459
+ * `componentWillUpdate` and `componentDidUpdate`.
460
+ *
461
+ * @param {?function} callback Called after update is complete.
462
+ * @final
463
+ * @protected
464
+ */
465
+
466
+
467
+ Component.prototype.forceUpdate = function (callback) {
468
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
469
+ };
470
+ /**
471
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
472
+ * we would like to deprecate them, we're not going to move them over to this
473
+ * modern base class. Instead, we define a getter that warns if it's accessed.
474
+ */
475
+
476
+
477
+ {
478
+ var deprecatedAPIs = {
479
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
480
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
481
+ };
482
+
483
+ var defineDeprecationWarning = function (methodName, info) {
484
+ Object.defineProperty(Component.prototype, methodName, {
485
+ get: function () {
486
+ warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
487
+
488
+ return undefined;
489
+ }
490
+ });
491
+ };
492
+
493
+ for (var fnName in deprecatedAPIs) {
494
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
495
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
496
+ }
497
+ }
498
+ }
499
+
500
+ function ComponentDummy() {}
501
+
502
+ ComponentDummy.prototype = Component.prototype;
503
+ /**
504
+ * Convenience component with default shallow equality check for sCU.
505
+ */
506
+
507
+ function PureComponent(props, context, updater) {
508
+ this.props = props;
509
+ this.context = context; // If a component has string refs, we will assign a different object later.
510
+
511
+ this.refs = emptyObject;
512
+ this.updater = updater || ReactNoopUpdateQueue;
513
+ }
514
+
515
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
516
+ pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
517
+
518
+ assign(pureComponentPrototype, Component.prototype);
519
+ pureComponentPrototype.isPureReactComponent = true;
520
+
521
+ // an immutable object with a single mutable value
522
+ function createRef() {
523
+ var refObject = {
524
+ current: null
525
+ };
526
+
527
+ {
528
+ Object.seal(refObject);
529
+ }
530
+
531
+ return refObject;
532
+ }
533
+
534
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
535
+
536
+ function isArray(a) {
537
+ return isArrayImpl(a);
538
+ }
539
+
540
+ /*
541
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
542
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
543
+ *
544
+ * The functions in this module will throw an easier-to-understand,
545
+ * easier-to-debug exception with a clear errors message message explaining the
546
+ * problem. (Instead of a confusing exception thrown inside the implementation
547
+ * of the `value` object).
548
+ */
549
+ // $FlowFixMe only called in DEV, so void return is not possible.
550
+ function typeName(value) {
551
+ {
552
+ // toStringTag is needed for namespaced types like Temporal.Instant
553
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
554
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
555
+ return type;
556
+ }
557
+ } // $FlowFixMe only called in DEV, so void return is not possible.
558
+
559
+
560
+ function willCoercionThrow(value) {
561
+ {
562
+ try {
563
+ testStringCoercion(value);
564
+ return false;
565
+ } catch (e) {
566
+ return true;
567
+ }
568
+ }
569
+ }
570
+
571
+ function testStringCoercion(value) {
572
+ // If you ended up here by following an exception call stack, here's what's
573
+ // happened: you supplied an object or symbol value to React (as a prop, key,
574
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
575
+ // coerce it to a string using `'' + value`, an exception was thrown.
576
+ //
577
+ // The most common types that will cause this exception are `Symbol` instances
578
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
579
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
580
+ // exception. (Library authors do this to prevent users from using built-in
581
+ // numeric operators like `+` or comparison operators like `>=` because custom
582
+ // methods are needed to perform accurate arithmetic or comparison.)
583
+ //
584
+ // To fix the problem, coerce this object or symbol value to a string before
585
+ // passing it to React. The most reliable way is usually `String(value)`.
586
+ //
587
+ // To find which value is throwing, check the browser or debugger console.
588
+ // Before this exception was thrown, there should be `console.error` output
589
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
590
+ // problem and how that type was used: key, atrribute, input value prop, etc.
591
+ // In most cases, this console output also shows the component and its
592
+ // ancestor components where the exception happened.
593
+ //
594
+ // eslint-disable-next-line react-internal/safe-string-coercion
595
+ return '' + value;
596
+ }
597
+ function checkKeyStringCoercion(value) {
598
+ {
599
+ if (willCoercionThrow(value)) {
600
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
601
+
602
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
603
+ }
604
+ }
605
+ }
606
+
607
+ function getWrappedName(outerType, innerType, wrapperName) {
608
+ var displayName = outerType.displayName;
609
+
610
+ if (displayName) {
611
+ return displayName;
612
+ }
613
+
614
+ var functionName = innerType.displayName || innerType.name || '';
615
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
616
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
617
+
618
+
619
+ function getContextName(type) {
620
+ return type.displayName || 'Context';
621
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
622
+
623
+
624
+ function getComponentNameFromType(type) {
625
+ if (type == null) {
626
+ // Host root, text node or just invalid type.
627
+ return null;
628
+ }
629
+
630
+ {
631
+ if (typeof type.tag === 'number') {
632
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
633
+ }
634
+ }
635
+
636
+ if (typeof type === 'function') {
637
+ return type.displayName || type.name || null;
638
+ }
639
+
640
+ if (typeof type === 'string') {
641
+ return type;
642
+ }
643
+
644
+ switch (type) {
645
+ case REACT_FRAGMENT_TYPE:
646
+ return 'Fragment';
647
+
648
+ case REACT_PORTAL_TYPE:
649
+ return 'Portal';
650
+
651
+ case REACT_PROFILER_TYPE:
652
+ return 'Profiler';
653
+
654
+ case REACT_STRICT_MODE_TYPE:
655
+ return 'StrictMode';
656
+
657
+ case REACT_SUSPENSE_TYPE:
658
+ return 'Suspense';
659
+
660
+ case REACT_SUSPENSE_LIST_TYPE:
661
+ return 'SuspenseList';
662
+
663
+ }
664
+
665
+ if (typeof type === 'object') {
666
+ switch (type.$$typeof) {
667
+ case REACT_CONTEXT_TYPE:
668
+ var context = type;
669
+ return getContextName(context) + '.Consumer';
670
+
671
+ case REACT_PROVIDER_TYPE:
672
+ var provider = type;
673
+ return getContextName(provider._context) + '.Provider';
674
+
675
+ case REACT_FORWARD_REF_TYPE:
676
+ return getWrappedName(type, type.render, 'ForwardRef');
677
+
678
+ case REACT_MEMO_TYPE:
679
+ var outerName = type.displayName || null;
680
+
681
+ if (outerName !== null) {
682
+ return outerName;
683
+ }
684
+
685
+ return getComponentNameFromType(type.type) || 'Memo';
686
+
687
+ case REACT_LAZY_TYPE:
688
+ {
689
+ var lazyComponent = type;
690
+ var payload = lazyComponent._payload;
691
+ var init = lazyComponent._init;
692
+
693
+ try {
694
+ return getComponentNameFromType(init(payload));
695
+ } catch (x) {
696
+ return null;
697
+ }
698
+ }
699
+
700
+ // eslint-disable-next-line no-fallthrough
701
+ }
702
+ }
703
+
704
+ return null;
705
+ }
706
+
707
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
708
+
709
+ var RESERVED_PROPS = {
710
+ key: true,
711
+ ref: true,
712
+ __self: true,
713
+ __source: true
714
+ };
715
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
716
+
717
+ {
718
+ didWarnAboutStringRefs = {};
719
+ }
720
+
721
+ function hasValidRef(config) {
722
+ {
723
+ if (hasOwnProperty.call(config, 'ref')) {
724
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
725
+
726
+ if (getter && getter.isReactWarning) {
727
+ return false;
728
+ }
729
+ }
730
+ }
731
+
732
+ return config.ref !== undefined;
733
+ }
734
+
735
+ function hasValidKey(config) {
736
+ {
737
+ if (hasOwnProperty.call(config, 'key')) {
738
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
739
+
740
+ if (getter && getter.isReactWarning) {
741
+ return false;
742
+ }
743
+ }
744
+ }
745
+
746
+ return config.key !== undefined;
747
+ }
748
+
749
+ function defineKeyPropWarningGetter(props, displayName) {
750
+ var warnAboutAccessingKey = function () {
751
+ {
752
+ if (!specialPropKeyWarningShown) {
753
+ specialPropKeyWarningShown = true;
754
+
755
+ error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
756
+ }
757
+ }
758
+ };
759
+
760
+ warnAboutAccessingKey.isReactWarning = true;
761
+ Object.defineProperty(props, 'key', {
762
+ get: warnAboutAccessingKey,
763
+ configurable: true
764
+ });
765
+ }
766
+
767
+ function defineRefPropWarningGetter(props, displayName) {
768
+ var warnAboutAccessingRef = function () {
769
+ {
770
+ if (!specialPropRefWarningShown) {
771
+ specialPropRefWarningShown = true;
772
+
773
+ error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
774
+ }
775
+ }
776
+ };
777
+
778
+ warnAboutAccessingRef.isReactWarning = true;
779
+ Object.defineProperty(props, 'ref', {
780
+ get: warnAboutAccessingRef,
781
+ configurable: true
782
+ });
783
+ }
784
+
785
+ function warnIfStringRefCannotBeAutoConverted(config) {
786
+ {
787
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
788
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
789
+
790
+ if (!didWarnAboutStringRefs[componentName]) {
791
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
792
+
793
+ didWarnAboutStringRefs[componentName] = true;
794
+ }
795
+ }
796
+ }
797
+ }
798
+ /**
799
+ * Factory method to create a new React element. This no longer adheres to
800
+ * the class pattern, so do not use new to call it. Also, instanceof check
801
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
802
+ * if something is a React Element.
803
+ *
804
+ * @param {*} type
805
+ * @param {*} props
806
+ * @param {*} key
807
+ * @param {string|object} ref
808
+ * @param {*} owner
809
+ * @param {*} self A *temporary* helper to detect places where `this` is
810
+ * different from the `owner` when React.createElement is called, so that we
811
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
812
+ * functions, and as long as `this` and owner are the same, there will be no
813
+ * change in behavior.
814
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
815
+ * indicating filename, line number, and/or other information.
816
+ * @internal
817
+ */
818
+
819
+
820
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
821
+ var element = {
822
+ // This tag allows us to uniquely identify this as a React Element
823
+ $$typeof: REACT_ELEMENT_TYPE,
824
+ // Built-in properties that belong on the element
825
+ type: type,
826
+ key: key,
827
+ ref: ref,
828
+ props: props,
829
+ // Record the component responsible for creating this element.
830
+ _owner: owner
831
+ };
832
+
833
+ {
834
+ // The validation flag is currently mutative. We put it on
835
+ // an external backing store so that we can freeze the whole object.
836
+ // This can be replaced with a WeakMap once they are implemented in
837
+ // commonly used development environments.
838
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
839
+ // the validation flag non-enumerable (where possible, which should
840
+ // include every environment we run tests in), so the test framework
841
+ // ignores it.
842
+
843
+ Object.defineProperty(element._store, 'validated', {
844
+ configurable: false,
845
+ enumerable: false,
846
+ writable: true,
847
+ value: false
848
+ }); // self and source are DEV only properties.
849
+
850
+ Object.defineProperty(element, '_self', {
851
+ configurable: false,
852
+ enumerable: false,
853
+ writable: false,
854
+ value: self
855
+ }); // Two elements created in two different places should be considered
856
+ // equal for testing purposes and therefore we hide it from enumeration.
857
+
858
+ Object.defineProperty(element, '_source', {
859
+ configurable: false,
860
+ enumerable: false,
861
+ writable: false,
862
+ value: source
863
+ });
864
+
865
+ if (Object.freeze) {
866
+ Object.freeze(element.props);
867
+ Object.freeze(element);
868
+ }
869
+ }
870
+
871
+ return element;
872
+ };
873
+ /**
874
+ * Create and return a new ReactElement of the given type.
875
+ * See https://reactjs.org/docs/react-api.html#createelement
876
+ */
877
+
878
+ function createElement(type, config, children) {
879
+ var propName; // Reserved names are extracted
880
+
881
+ var props = {};
882
+ var key = null;
883
+ var ref = null;
884
+ var self = null;
885
+ var source = null;
886
+
887
+ if (config != null) {
888
+ if (hasValidRef(config)) {
889
+ ref = config.ref;
890
+
891
+ {
892
+ warnIfStringRefCannotBeAutoConverted(config);
893
+ }
894
+ }
895
+
896
+ if (hasValidKey(config)) {
897
+ {
898
+ checkKeyStringCoercion(config.key);
899
+ }
900
+
901
+ key = '' + config.key;
902
+ }
903
+
904
+ self = config.__self === undefined ? null : config.__self;
905
+ source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
906
+
907
+ for (propName in config) {
908
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
909
+ props[propName] = config[propName];
910
+ }
911
+ }
912
+ } // Children can be more than one argument, and those are transferred onto
913
+ // the newly allocated props object.
914
+
915
+
916
+ var childrenLength = arguments.length - 2;
917
+
918
+ if (childrenLength === 1) {
919
+ props.children = children;
920
+ } else if (childrenLength > 1) {
921
+ var childArray = Array(childrenLength);
922
+
923
+ for (var i = 0; i < childrenLength; i++) {
924
+ childArray[i] = arguments[i + 2];
925
+ }
926
+
927
+ {
928
+ if (Object.freeze) {
929
+ Object.freeze(childArray);
930
+ }
931
+ }
932
+
933
+ props.children = childArray;
934
+ } // Resolve default props
935
+
936
+
937
+ if (type && type.defaultProps) {
938
+ var defaultProps = type.defaultProps;
939
+
940
+ for (propName in defaultProps) {
941
+ if (props[propName] === undefined) {
942
+ props[propName] = defaultProps[propName];
943
+ }
944
+ }
945
+ }
946
+
947
+ {
948
+ if (key || ref) {
949
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
950
+
951
+ if (key) {
952
+ defineKeyPropWarningGetter(props, displayName);
953
+ }
954
+
955
+ if (ref) {
956
+ defineRefPropWarningGetter(props, displayName);
957
+ }
958
+ }
959
+ }
960
+
961
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
962
+ }
963
+ function cloneAndReplaceKey(oldElement, newKey) {
964
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
965
+ return newElement;
966
+ }
967
+ /**
968
+ * Clone and return a new ReactElement using element as the starting point.
969
+ * See https://reactjs.org/docs/react-api.html#cloneelement
970
+ */
971
+
972
+ function cloneElement(element, config, children) {
973
+ if (element === null || element === undefined) {
974
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
975
+ }
976
+
977
+ var propName; // Original props are copied
978
+
979
+ var props = assign({}, element.props); // Reserved names are extracted
980
+
981
+ var key = element.key;
982
+ var ref = element.ref; // Self is preserved since the owner is preserved.
983
+
984
+ var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
985
+ // transpiler, and the original source is probably a better indicator of the
986
+ // true owner.
987
+
988
+ var source = element._source; // Owner will be preserved, unless ref is overridden
989
+
990
+ var owner = element._owner;
991
+
992
+ if (config != null) {
993
+ if (hasValidRef(config)) {
994
+ // Silently steal the ref from the parent.
995
+ ref = config.ref;
996
+ owner = ReactCurrentOwner.current;
997
+ }
998
+
999
+ if (hasValidKey(config)) {
1000
+ {
1001
+ checkKeyStringCoercion(config.key);
1002
+ }
1003
+
1004
+ key = '' + config.key;
1005
+ } // Remaining properties override existing props
1006
+
1007
+
1008
+ var defaultProps;
1009
+
1010
+ if (element.type && element.type.defaultProps) {
1011
+ defaultProps = element.type.defaultProps;
1012
+ }
1013
+
1014
+ for (propName in config) {
1015
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1016
+ if (config[propName] === undefined && defaultProps !== undefined) {
1017
+ // Resolve default props
1018
+ props[propName] = defaultProps[propName];
1019
+ } else {
1020
+ props[propName] = config[propName];
1021
+ }
1022
+ }
1023
+ }
1024
+ } // Children can be more than one argument, and those are transferred onto
1025
+ // the newly allocated props object.
1026
+
1027
+
1028
+ var childrenLength = arguments.length - 2;
1029
+
1030
+ if (childrenLength === 1) {
1031
+ props.children = children;
1032
+ } else if (childrenLength > 1) {
1033
+ var childArray = Array(childrenLength);
1034
+
1035
+ for (var i = 0; i < childrenLength; i++) {
1036
+ childArray[i] = arguments[i + 2];
1037
+ }
1038
+
1039
+ props.children = childArray;
1040
+ }
1041
+
1042
+ return ReactElement(element.type, key, ref, self, source, owner, props);
1043
+ }
1044
+ /**
1045
+ * Verifies the object is a ReactElement.
1046
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
1047
+ * @param {?object} object
1048
+ * @return {boolean} True if `object` is a ReactElement.
1049
+ * @final
1050
+ */
1051
+
1052
+ function isValidElement(object) {
1053
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1054
+ }
1055
+
1056
+ var SEPARATOR = '.';
1057
+ var SUBSEPARATOR = ':';
1058
+ /**
1059
+ * Escape and wrap key so it is safe to use as a reactid
1060
+ *
1061
+ * @param {string} key to be escaped.
1062
+ * @return {string} the escaped key.
1063
+ */
1064
+
1065
+ function escape(key) {
1066
+ var escapeRegex = /[=:]/g;
1067
+ var escaperLookup = {
1068
+ '=': '=0',
1069
+ ':': '=2'
1070
+ };
1071
+ var escapedString = key.replace(escapeRegex, function (match) {
1072
+ return escaperLookup[match];
1073
+ });
1074
+ return '$' + escapedString;
1075
+ }
1076
+ /**
1077
+ * TODO: Test that a single child and an array with one item have the same key
1078
+ * pattern.
1079
+ */
1080
+
1081
+
1082
+ var didWarnAboutMaps = false;
1083
+ var userProvidedKeyEscapeRegex = /\/+/g;
1084
+
1085
+ function escapeUserProvidedKey(text) {
1086
+ return text.replace(userProvidedKeyEscapeRegex, '$&/');
1087
+ }
1088
+ /**
1089
+ * Generate a key string that identifies a element within a set.
1090
+ *
1091
+ * @param {*} element A element that could contain a manual key.
1092
+ * @param {number} index Index that is used if a manual key is not provided.
1093
+ * @return {string}
1094
+ */
1095
+
1096
+
1097
+ function getElementKey(element, index) {
1098
+ // Do some typechecking here since we call this blindly. We want to ensure
1099
+ // that we don't block potential future ES APIs.
1100
+ if (typeof element === 'object' && element !== null && element.key != null) {
1101
+ // Explicit key
1102
+ {
1103
+ checkKeyStringCoercion(element.key);
1104
+ }
1105
+
1106
+ return escape('' + element.key);
1107
+ } // Implicit key determined by the index in the set
1108
+
1109
+
1110
+ return index.toString(36);
1111
+ }
1112
+
1113
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
1114
+ var type = typeof children;
1115
+
1116
+ if (type === 'undefined' || type === 'boolean') {
1117
+ // All of the above are perceived as null.
1118
+ children = null;
1119
+ }
1120
+
1121
+ var invokeCallback = false;
1122
+
1123
+ if (children === null) {
1124
+ invokeCallback = true;
1125
+ } else {
1126
+ switch (type) {
1127
+ case 'string':
1128
+ case 'number':
1129
+ invokeCallback = true;
1130
+ break;
1131
+
1132
+ case 'object':
1133
+ switch (children.$$typeof) {
1134
+ case REACT_ELEMENT_TYPE:
1135
+ case REACT_PORTAL_TYPE:
1136
+ invokeCallback = true;
1137
+ }
1138
+
1139
+ }
1140
+ }
1141
+
1142
+ if (invokeCallback) {
1143
+ var _child = children;
1144
+ var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
1145
+ // so that it's consistent if the number of children grows:
1146
+
1147
+ var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
1148
+
1149
+ if (isArray(mappedChild)) {
1150
+ var escapedChildKey = '';
1151
+
1152
+ if (childKey != null) {
1153
+ escapedChildKey = escapeUserProvidedKey(childKey) + '/';
1154
+ }
1155
+
1156
+ mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
1157
+ return c;
1158
+ });
1159
+ } else if (mappedChild != null) {
1160
+ if (isValidElement(mappedChild)) {
1161
+ {
1162
+ // The `if` statement here prevents auto-disabling of the safe
1163
+ // coercion ESLint rule, so we must manually disable it below.
1164
+ // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
1165
+ if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
1166
+ checkKeyStringCoercion(mappedChild.key);
1167
+ }
1168
+ }
1169
+
1170
+ mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
1171
+ // traverseAllChildren used to do for objects as children
1172
+ escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
1173
+ mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
1174
+ // eslint-disable-next-line react-internal/safe-string-coercion
1175
+ escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
1176
+ }
1177
+
1178
+ array.push(mappedChild);
1179
+ }
1180
+
1181
+ return 1;
1182
+ }
1183
+
1184
+ var child;
1185
+ var nextName;
1186
+ var subtreeCount = 0; // Count of children found in the current subtree.
1187
+
1188
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1189
+
1190
+ if (isArray(children)) {
1191
+ for (var i = 0; i < children.length; i++) {
1192
+ child = children[i];
1193
+ nextName = nextNamePrefix + getElementKey(child, i);
1194
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
1195
+ }
1196
+ } else {
1197
+ var iteratorFn = getIteratorFn(children);
1198
+
1199
+ if (typeof iteratorFn === 'function') {
1200
+ var iterableChildren = children;
1201
+
1202
+ {
1203
+ // Warn about using Maps as children
1204
+ if (iteratorFn === iterableChildren.entries) {
1205
+ if (!didWarnAboutMaps) {
1206
+ warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
1207
+ }
1208
+
1209
+ didWarnAboutMaps = true;
1210
+ }
1211
+ }
1212
+
1213
+ var iterator = iteratorFn.call(iterableChildren);
1214
+ var step;
1215
+ var ii = 0;
1216
+
1217
+ while (!(step = iterator.next()).done) {
1218
+ child = step.value;
1219
+ nextName = nextNamePrefix + getElementKey(child, ii++);
1220
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
1221
+ }
1222
+ } else if (type === 'object') {
1223
+ // eslint-disable-next-line react-internal/safe-string-coercion
1224
+ var childrenString = String(children);
1225
+ 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.');
1226
+ }
1227
+ }
1228
+
1229
+ return subtreeCount;
1230
+ }
1231
+
1232
+ /**
1233
+ * Maps children that are typically specified as `props.children`.
1234
+ *
1235
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
1236
+ *
1237
+ * The provided mapFunction(child, index) will be called for each
1238
+ * leaf child.
1239
+ *
1240
+ * @param {?*} children Children tree container.
1241
+ * @param {function(*, int)} func The map function.
1242
+ * @param {*} context Context for mapFunction.
1243
+ * @return {object} Object containing the ordered map of results.
1244
+ */
1245
+ function mapChildren(children, func, context) {
1246
+ if (children == null) {
1247
+ return children;
1248
+ }
1249
+
1250
+ var result = [];
1251
+ var count = 0;
1252
+ mapIntoArray(children, result, '', '', function (child) {
1253
+ return func.call(context, child, count++);
1254
+ });
1255
+ return result;
1256
+ }
1257
+ /**
1258
+ * Count the number of children that are typically specified as
1259
+ * `props.children`.
1260
+ *
1261
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
1262
+ *
1263
+ * @param {?*} children Children tree container.
1264
+ * @return {number} The number of children.
1265
+ */
1266
+
1267
+
1268
+ function countChildren(children) {
1269
+ var n = 0;
1270
+ mapChildren(children, function () {
1271
+ n++; // Don't return anything
1272
+ });
1273
+ return n;
1274
+ }
1275
+
1276
+ /**
1277
+ * Iterates through children that are typically specified as `props.children`.
1278
+ *
1279
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1280
+ *
1281
+ * The provided forEachFunc(child, index) will be called for each
1282
+ * leaf child.
1283
+ *
1284
+ * @param {?*} children Children tree container.
1285
+ * @param {function(*, int)} forEachFunc
1286
+ * @param {*} forEachContext Context for forEachContext.
1287
+ */
1288
+ function forEachChildren(children, forEachFunc, forEachContext) {
1289
+ mapChildren(children, function () {
1290
+ forEachFunc.apply(this, arguments); // Don't return anything.
1291
+ }, forEachContext);
1292
+ }
1293
+ /**
1294
+ * Flatten a children object (typically specified as `props.children`) and
1295
+ * return an array with appropriately re-keyed children.
1296
+ *
1297
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1298
+ */
1299
+
1300
+
1301
+ function toArray(children) {
1302
+ return mapChildren(children, function (child) {
1303
+ return child;
1304
+ }) || [];
1305
+ }
1306
+ /**
1307
+ * Returns the first child in a collection of children and verifies that there
1308
+ * is only one child in the collection.
1309
+ *
1310
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1311
+ *
1312
+ * The current implementation of this function assumes that a single child gets
1313
+ * passed without a wrapper, but the purpose of this helper function is to
1314
+ * abstract away the particular structure of children.
1315
+ *
1316
+ * @param {?object} children Child collection structure.
1317
+ * @return {ReactElement} The first and only `ReactElement` contained in the
1318
+ * structure.
1319
+ */
1320
+
1321
+
1322
+ function onlyChild(children) {
1323
+ if (!isValidElement(children)) {
1324
+ throw new Error('React.Children.only expected to receive a single React element child.');
1325
+ }
1326
+
1327
+ return children;
1328
+ }
1329
+
1330
+ function createContext(defaultValue) {
1331
+ // TODO: Second argument used to be an optional `calculateChangedBits`
1332
+ // function. Warn to reserve for future use?
1333
+ var context = {
1334
+ $$typeof: REACT_CONTEXT_TYPE,
1335
+ // As a workaround to support multiple concurrent renderers, we categorize
1336
+ // some renderers as primary and others as secondary. We only expect
1337
+ // there to be two concurrent renderers at most: React Native (primary) and
1338
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
1339
+ // Secondary renderers store their context values on separate fields.
1340
+ _currentValue: defaultValue,
1341
+ _currentValue2: defaultValue,
1342
+ // Used to track how many concurrent renderers this context currently
1343
+ // supports within in a single renderer. Such as parallel server rendering.
1344
+ _threadCount: 0,
1345
+ // These are circular
1346
+ Provider: null,
1347
+ Consumer: null,
1348
+ // Add these to use same hidden class in VM as ServerContext
1349
+ _defaultValue: null,
1350
+ _globalName: null
1351
+ };
1352
+ context.Provider = {
1353
+ $$typeof: REACT_PROVIDER_TYPE,
1354
+ _context: context
1355
+ };
1356
+ var hasWarnedAboutUsingNestedContextConsumers = false;
1357
+ var hasWarnedAboutUsingConsumerProvider = false;
1358
+ var hasWarnedAboutDisplayNameOnConsumer = false;
1359
+
1360
+ {
1361
+ // A separate object, but proxies back to the original context object for
1362
+ // backwards compatibility. It has a different $$typeof, so we can properly
1363
+ // warn for the incorrect usage of Context as a Consumer.
1364
+ var Consumer = {
1365
+ $$typeof: REACT_CONTEXT_TYPE,
1366
+ _context: context
1367
+ }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
1368
+
1369
+ Object.defineProperties(Consumer, {
1370
+ Provider: {
1371
+ get: function () {
1372
+ if (!hasWarnedAboutUsingConsumerProvider) {
1373
+ hasWarnedAboutUsingConsumerProvider = true;
1374
+
1375
+ error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
1376
+ }
1377
+
1378
+ return context.Provider;
1379
+ },
1380
+ set: function (_Provider) {
1381
+ context.Provider = _Provider;
1382
+ }
1383
+ },
1384
+ _currentValue: {
1385
+ get: function () {
1386
+ return context._currentValue;
1387
+ },
1388
+ set: function (_currentValue) {
1389
+ context._currentValue = _currentValue;
1390
+ }
1391
+ },
1392
+ _currentValue2: {
1393
+ get: function () {
1394
+ return context._currentValue2;
1395
+ },
1396
+ set: function (_currentValue2) {
1397
+ context._currentValue2 = _currentValue2;
1398
+ }
1399
+ },
1400
+ _threadCount: {
1401
+ get: function () {
1402
+ return context._threadCount;
1403
+ },
1404
+ set: function (_threadCount) {
1405
+ context._threadCount = _threadCount;
1406
+ }
1407
+ },
1408
+ Consumer: {
1409
+ get: function () {
1410
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
1411
+ hasWarnedAboutUsingNestedContextConsumers = true;
1412
+
1413
+ error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
1414
+ }
1415
+
1416
+ return context.Consumer;
1417
+ }
1418
+ },
1419
+ displayName: {
1420
+ get: function () {
1421
+ return context.displayName;
1422
+ },
1423
+ set: function (displayName) {
1424
+ if (!hasWarnedAboutDisplayNameOnConsumer) {
1425
+ warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
1426
+
1427
+ hasWarnedAboutDisplayNameOnConsumer = true;
1428
+ }
1429
+ }
1430
+ }
1431
+ }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
1432
+
1433
+ context.Consumer = Consumer;
1434
+ }
1435
+
1436
+ {
1437
+ context._currentRenderer = null;
1438
+ context._currentRenderer2 = null;
1439
+ }
1440
+
1441
+ return context;
1442
+ }
1443
+
1444
+ var Uninitialized = -1;
1445
+ var Pending = 0;
1446
+ var Resolved = 1;
1447
+ var Rejected = 2;
1448
+
1449
+ function lazyInitializer(payload) {
1450
+ if (payload._status === Uninitialized) {
1451
+ var ctor = payload._result;
1452
+ var thenable = ctor(); // Transition to the next state.
1453
+ // This might throw either because it's missing or throws. If so, we treat it
1454
+ // as still uninitialized and try again next time. Which is the same as what
1455
+ // happens if the ctor or any wrappers processing the ctor throws. This might
1456
+ // end up fixing it if the resolution was a concurrency bug.
1457
+
1458
+ thenable.then(function (moduleObject) {
1459
+ if (payload._status === Pending || payload._status === Uninitialized) {
1460
+ // Transition to the next state.
1461
+ var resolved = payload;
1462
+ resolved._status = Resolved;
1463
+ resolved._result = moduleObject;
1464
+ }
1465
+ }, function (error) {
1466
+ if (payload._status === Pending || payload._status === Uninitialized) {
1467
+ // Transition to the next state.
1468
+ var rejected = payload;
1469
+ rejected._status = Rejected;
1470
+ rejected._result = error;
1471
+ }
1472
+ });
1473
+
1474
+ if (payload._status === Uninitialized) {
1475
+ // In case, we're still uninitialized, then we're waiting for the thenable
1476
+ // to resolve. Set it as pending in the meantime.
1477
+ var pending = payload;
1478
+ pending._status = Pending;
1479
+ pending._result = thenable;
1480
+ }
1481
+ }
1482
+
1483
+ if (payload._status === Resolved) {
1484
+ var moduleObject = payload._result;
1485
+
1486
+ {
1487
+ if (moduleObject === undefined) {
1488
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1489
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
1490
+ }
1491
+ }
1492
+
1493
+ {
1494
+ if (!('default' in moduleObject)) {
1495
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1496
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
1497
+ }
1498
+ }
1499
+
1500
+ return moduleObject.default;
1501
+ } else {
1502
+ throw payload._result;
1503
+ }
1504
+ }
1505
+
1506
+ function lazy(ctor) {
1507
+ var payload = {
1508
+ // We use these fields to store the result.
1509
+ _status: Uninitialized,
1510
+ _result: ctor
1511
+ };
1512
+ var lazyType = {
1513
+ $$typeof: REACT_LAZY_TYPE,
1514
+ _payload: payload,
1515
+ _init: lazyInitializer
1516
+ };
1517
+
1518
+ {
1519
+ // In production, this would just set it on the object.
1520
+ var defaultProps;
1521
+ var propTypes; // $FlowFixMe
1522
+
1523
+ Object.defineProperties(lazyType, {
1524
+ defaultProps: {
1525
+ configurable: true,
1526
+ get: function () {
1527
+ return defaultProps;
1528
+ },
1529
+ set: function (newDefaultProps) {
1530
+ error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
1531
+
1532
+ defaultProps = newDefaultProps; // Match production behavior more closely:
1533
+ // $FlowFixMe
1534
+
1535
+ Object.defineProperty(lazyType, 'defaultProps', {
1536
+ enumerable: true
1537
+ });
1538
+ }
1539
+ },
1540
+ propTypes: {
1541
+ configurable: true,
1542
+ get: function () {
1543
+ return propTypes;
1544
+ },
1545
+ set: function (newPropTypes) {
1546
+ error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
1547
+
1548
+ propTypes = newPropTypes; // Match production behavior more closely:
1549
+ // $FlowFixMe
1550
+
1551
+ Object.defineProperty(lazyType, 'propTypes', {
1552
+ enumerable: true
1553
+ });
1554
+ }
1555
+ }
1556
+ });
1557
+ }
1558
+
1559
+ return lazyType;
1560
+ }
1561
+
1562
+ function forwardRef(render) {
1563
+ {
1564
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1565
+ error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
1566
+ } else if (typeof render !== 'function') {
1567
+ error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
1568
+ } else {
1569
+ if (render.length !== 0 && render.length !== 2) {
1570
+ error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
1571
+ }
1572
+ }
1573
+
1574
+ if (render != null) {
1575
+ if (render.defaultProps != null || render.propTypes != null) {
1576
+ error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
1577
+ }
1578
+ }
1579
+ }
1580
+
1581
+ var elementType = {
1582
+ $$typeof: REACT_FORWARD_REF_TYPE,
1583
+ render: render
1584
+ };
1585
+
1586
+ {
1587
+ var ownName;
1588
+ Object.defineProperty(elementType, 'displayName', {
1589
+ enumerable: false,
1590
+ configurable: true,
1591
+ get: function () {
1592
+ return ownName;
1593
+ },
1594
+ set: function (name) {
1595
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
1596
+ // because the component may be used elsewhere.
1597
+ // But it's nice for anonymous functions to inherit the name,
1598
+ // so that our component-stack generation logic will display their frames.
1599
+ // An anonymous function generally suggests a pattern like:
1600
+ // React.forwardRef((props, ref) => {...});
1601
+ // This kind of inner function is not used elsewhere so the side effect is okay.
1602
+
1603
+ if (!render.name && !render.displayName) {
1604
+ render.displayName = name;
1605
+ }
1606
+ }
1607
+ });
1608
+ }
1609
+
1610
+ return elementType;
1611
+ }
1612
+
1613
+ var REACT_MODULE_REFERENCE;
1614
+
1615
+ {
1616
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
1617
+ }
1618
+
1619
+ function isValidElementType(type) {
1620
+ if (typeof type === 'string' || typeof type === 'function') {
1621
+ return true;
1622
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1623
+
1624
+
1625
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
1626
+ return true;
1627
+ }
1628
+
1629
+ if (typeof type === 'object' && type !== null) {
1630
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1631
+ // types supported by any Flight configuration anywhere since
1632
+ // we don't know which Flight build this will end up being used
1633
+ // with.
1634
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
1635
+ return true;
1636
+ }
1637
+ }
1638
+
1639
+ return false;
1640
+ }
1641
+
1642
+ function memo(type, compare) {
1643
+ {
1644
+ if (!isValidElementType(type)) {
1645
+ error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
1646
+ }
1647
+ }
1648
+
1649
+ var elementType = {
1650
+ $$typeof: REACT_MEMO_TYPE,
1651
+ type: type,
1652
+ compare: compare === undefined ? null : compare
1653
+ };
1654
+
1655
+ {
1656
+ var ownName;
1657
+ Object.defineProperty(elementType, 'displayName', {
1658
+ enumerable: false,
1659
+ configurable: true,
1660
+ get: function () {
1661
+ return ownName;
1662
+ },
1663
+ set: function (name) {
1664
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
1665
+ // because the component may be used elsewhere.
1666
+ // But it's nice for anonymous functions to inherit the name,
1667
+ // so that our component-stack generation logic will display their frames.
1668
+ // An anonymous function generally suggests a pattern like:
1669
+ // React.memo((props) => {...});
1670
+ // This kind of inner function is not used elsewhere so the side effect is okay.
1671
+
1672
+ if (!type.name && !type.displayName) {
1673
+ type.displayName = name;
1674
+ }
1675
+ }
1676
+ });
1677
+ }
1678
+
1679
+ return elementType;
1680
+ }
1681
+
1682
+ function resolveDispatcher() {
1683
+ var dispatcher = ReactCurrentDispatcher.current;
1684
+
1685
+ {
1686
+ if (dispatcher === null) {
1687
+ error('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:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
1688
+ }
1689
+ } // Will result in a null access error if accessed outside render phase. We
1690
+ // intentionally don't throw our own error because this is in a hot path.
1691
+ // Also helps ensure this is inlined.
1692
+
1693
+
1694
+ return dispatcher;
1695
+ }
1696
+ function useContext(Context) {
1697
+ var dispatcher = resolveDispatcher();
1698
+
1699
+ {
1700
+ // TODO: add a more generic warning for invalid values.
1701
+ if (Context._context !== undefined) {
1702
+ var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
1703
+ // and nobody should be using this in existing code.
1704
+
1705
+ if (realContext.Consumer === Context) {
1706
+ error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
1707
+ } else if (realContext.Provider === Context) {
1708
+ error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
1709
+ }
1710
+ }
1711
+ }
1712
+
1713
+ return dispatcher.useContext(Context);
1714
+ }
1715
+ function useState(initialState) {
1716
+ var dispatcher = resolveDispatcher();
1717
+ return dispatcher.useState(initialState);
1718
+ }
1719
+ function useReducer(reducer, initialArg, init) {
1720
+ var dispatcher = resolveDispatcher();
1721
+ return dispatcher.useReducer(reducer, initialArg, init);
1722
+ }
1723
+ function useRef(initialValue) {
1724
+ var dispatcher = resolveDispatcher();
1725
+ return dispatcher.useRef(initialValue);
1726
+ }
1727
+ function useEffect(create, deps) {
1728
+ var dispatcher = resolveDispatcher();
1729
+ return dispatcher.useEffect(create, deps);
1730
+ }
1731
+ function useInsertionEffect(create, deps) {
1732
+ var dispatcher = resolveDispatcher();
1733
+ return dispatcher.useInsertionEffect(create, deps);
1734
+ }
1735
+ function useLayoutEffect(create, deps) {
1736
+ var dispatcher = resolveDispatcher();
1737
+ return dispatcher.useLayoutEffect(create, deps);
1738
+ }
1739
+ function useCallback(callback, deps) {
1740
+ var dispatcher = resolveDispatcher();
1741
+ return dispatcher.useCallback(callback, deps);
1742
+ }
1743
+ function useMemo(create, deps) {
1744
+ var dispatcher = resolveDispatcher();
1745
+ return dispatcher.useMemo(create, deps);
1746
+ }
1747
+ function useImperativeHandle(ref, create, deps) {
1748
+ var dispatcher = resolveDispatcher();
1749
+ return dispatcher.useImperativeHandle(ref, create, deps);
1750
+ }
1751
+ function useDebugValue(value, formatterFn) {
1752
+ {
1753
+ var dispatcher = resolveDispatcher();
1754
+ return dispatcher.useDebugValue(value, formatterFn);
1755
+ }
1756
+ }
1757
+ function useTransition() {
1758
+ var dispatcher = resolveDispatcher();
1759
+ return dispatcher.useTransition();
1760
+ }
1761
+ function useDeferredValue(value) {
1762
+ var dispatcher = resolveDispatcher();
1763
+ return dispatcher.useDeferredValue(value);
1764
+ }
1765
+ function useId() {
1766
+ var dispatcher = resolveDispatcher();
1767
+ return dispatcher.useId();
1768
+ }
1769
+ function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1770
+ var dispatcher = resolveDispatcher();
1771
+ return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1772
+ }
1773
+
1774
+ // Helpers to patch console.logs to avoid logging during side-effect free
1775
+ // replaying on render function. This currently only patches the object
1776
+ // lazily which won't cover if the log function was extracted eagerly.
1777
+ // We could also eagerly patch the method.
1778
+ var disabledDepth = 0;
1779
+ var prevLog;
1780
+ var prevInfo;
1781
+ var prevWarn;
1782
+ var prevError;
1783
+ var prevGroup;
1784
+ var prevGroupCollapsed;
1785
+ var prevGroupEnd;
1786
+
1787
+ function disabledLog() {}
1788
+
1789
+ disabledLog.__reactDisabledLog = true;
1790
+ function disableLogs() {
1791
+ {
1792
+ if (disabledDepth === 0) {
1793
+ /* eslint-disable react-internal/no-production-logging */
1794
+ prevLog = console.log;
1795
+ prevInfo = console.info;
1796
+ prevWarn = console.warn;
1797
+ prevError = console.error;
1798
+ prevGroup = console.group;
1799
+ prevGroupCollapsed = console.groupCollapsed;
1800
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
1801
+
1802
+ var props = {
1803
+ configurable: true,
1804
+ enumerable: true,
1805
+ value: disabledLog,
1806
+ writable: true
1807
+ }; // $FlowFixMe Flow thinks console is immutable.
1808
+
1809
+ Object.defineProperties(console, {
1810
+ info: props,
1811
+ log: props,
1812
+ warn: props,
1813
+ error: props,
1814
+ group: props,
1815
+ groupCollapsed: props,
1816
+ groupEnd: props
1817
+ });
1818
+ /* eslint-enable react-internal/no-production-logging */
1819
+ }
1820
+
1821
+ disabledDepth++;
1822
+ }
1823
+ }
1824
+ function reenableLogs() {
1825
+ {
1826
+ disabledDepth--;
1827
+
1828
+ if (disabledDepth === 0) {
1829
+ /* eslint-disable react-internal/no-production-logging */
1830
+ var props = {
1831
+ configurable: true,
1832
+ enumerable: true,
1833
+ writable: true
1834
+ }; // $FlowFixMe Flow thinks console is immutable.
1835
+
1836
+ Object.defineProperties(console, {
1837
+ log: assign({}, props, {
1838
+ value: prevLog
1839
+ }),
1840
+ info: assign({}, props, {
1841
+ value: prevInfo
1842
+ }),
1843
+ warn: assign({}, props, {
1844
+ value: prevWarn
1845
+ }),
1846
+ error: assign({}, props, {
1847
+ value: prevError
1848
+ }),
1849
+ group: assign({}, props, {
1850
+ value: prevGroup
1851
+ }),
1852
+ groupCollapsed: assign({}, props, {
1853
+ value: prevGroupCollapsed
1854
+ }),
1855
+ groupEnd: assign({}, props, {
1856
+ value: prevGroupEnd
1857
+ })
1858
+ });
1859
+ /* eslint-enable react-internal/no-production-logging */
1860
+ }
1861
+
1862
+ if (disabledDepth < 0) {
1863
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
1864
+ }
1865
+ }
1866
+ }
1867
+
1868
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1869
+ var prefix;
1870
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
1871
+ {
1872
+ if (prefix === undefined) {
1873
+ // Extract the VM specific prefix used by each line.
1874
+ try {
1875
+ throw Error();
1876
+ } catch (x) {
1877
+ var match = x.stack.trim().match(/\n( *(at )?)/);
1878
+ prefix = match && match[1] || '';
1879
+ }
1880
+ } // We use the prefix to ensure our stacks line up with native stack frames.
1881
+
1882
+
1883
+ return '\n' + prefix + name;
1884
+ }
1885
+ }
1886
+ var reentry = false;
1887
+ var componentFrameCache;
1888
+
1889
+ {
1890
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
1891
+ componentFrameCache = new PossiblyWeakMap();
1892
+ }
1893
+
1894
+ function describeNativeComponentFrame(fn, construct) {
1895
+ // If something asked for a stack inside a fake render, it should get ignored.
1896
+ if ( !fn || reentry) {
1897
+ return '';
1898
+ }
1899
+
1900
+ {
1901
+ var frame = componentFrameCache.get(fn);
1902
+
1903
+ if (frame !== undefined) {
1904
+ return frame;
1905
+ }
1906
+ }
1907
+
1908
+ var control;
1909
+ reentry = true;
1910
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
1911
+
1912
+ Error.prepareStackTrace = undefined;
1913
+ var previousDispatcher;
1914
+
1915
+ {
1916
+ previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
1917
+ // for warnings.
1918
+
1919
+ ReactCurrentDispatcher$1.current = null;
1920
+ disableLogs();
1921
+ }
1922
+
1923
+ try {
1924
+ // This should throw.
1925
+ if (construct) {
1926
+ // Something should be setting the props in the constructor.
1927
+ var Fake = function () {
1928
+ throw Error();
1929
+ }; // $FlowFixMe
1930
+
1931
+
1932
+ Object.defineProperty(Fake.prototype, 'props', {
1933
+ set: function () {
1934
+ // We use a throwing setter instead of frozen or non-writable props
1935
+ // because that won't throw in a non-strict mode function.
1936
+ throw Error();
1937
+ }
1938
+ });
1939
+
1940
+ if (typeof Reflect === 'object' && Reflect.construct) {
1941
+ // We construct a different control for this case to include any extra
1942
+ // frames added by the construct call.
1943
+ try {
1944
+ Reflect.construct(Fake, []);
1945
+ } catch (x) {
1946
+ control = x;
1947
+ }
1948
+
1949
+ Reflect.construct(fn, [], Fake);
1950
+ } else {
1951
+ try {
1952
+ Fake.call();
1953
+ } catch (x) {
1954
+ control = x;
1955
+ }
1956
+
1957
+ fn.call(Fake.prototype);
1958
+ }
1959
+ } else {
1960
+ try {
1961
+ throw Error();
1962
+ } catch (x) {
1963
+ control = x;
1964
+ }
1965
+
1966
+ fn();
1967
+ }
1968
+ } catch (sample) {
1969
+ // This is inlined manually because closure doesn't do it for us.
1970
+ if (sample && control && typeof sample.stack === 'string') {
1971
+ // This extracts the first frame from the sample that isn't also in the control.
1972
+ // Skipping one frame that we assume is the frame that calls the two.
1973
+ var sampleLines = sample.stack.split('\n');
1974
+ var controlLines = control.stack.split('\n');
1975
+ var s = sampleLines.length - 1;
1976
+ var c = controlLines.length - 1;
1977
+
1978
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1979
+ // We expect at least one stack frame to be shared.
1980
+ // Typically this will be the root most one. However, stack frames may be
1981
+ // cut off due to maximum stack limits. In this case, one maybe cut off
1982
+ // earlier than the other. We assume that the sample is longer or the same
1983
+ // and there for cut off earlier. So we should find the root most frame in
1984
+ // the sample somewhere in the control.
1985
+ c--;
1986
+ }
1987
+
1988
+ for (; s >= 1 && c >= 0; s--, c--) {
1989
+ // Next we find the first one that isn't the same which should be the
1990
+ // frame that called our sample function and the control.
1991
+ if (sampleLines[s] !== controlLines[c]) {
1992
+ // In V8, the first line is describing the message but other VMs don't.
1993
+ // If we're about to return the first line, and the control is also on the same
1994
+ // line, that's a pretty good indicator that our sample threw at same line as
1995
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
1996
+ // This can happen if you passed a class to function component, or non-function.
1997
+ if (s !== 1 || c !== 1) {
1998
+ do {
1999
+ s--;
2000
+ c--; // We may still have similar intermediate frames from the construct call.
2001
+ // The next one that isn't the same should be our match though.
2002
+
2003
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
2004
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
2005
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
2006
+ // but we have a user-provided "displayName"
2007
+ // splice it in to make the stack more readable.
2008
+
2009
+
2010
+ if (fn.displayName && _frame.includes('<anonymous>')) {
2011
+ _frame = _frame.replace('<anonymous>', fn.displayName);
2012
+ }
2013
+
2014
+ {
2015
+ if (typeof fn === 'function') {
2016
+ componentFrameCache.set(fn, _frame);
2017
+ }
2018
+ } // Return the line we found.
2019
+
2020
+
2021
+ return _frame;
2022
+ }
2023
+ } while (s >= 1 && c >= 0);
2024
+ }
2025
+
2026
+ break;
2027
+ }
2028
+ }
2029
+ }
2030
+ } finally {
2031
+ reentry = false;
2032
+
2033
+ {
2034
+ ReactCurrentDispatcher$1.current = previousDispatcher;
2035
+ reenableLogs();
2036
+ }
2037
+
2038
+ Error.prepareStackTrace = previousPrepareStackTrace;
2039
+ } // Fallback to just using the name if we couldn't make it throw.
2040
+
2041
+
2042
+ var name = fn ? fn.displayName || fn.name : '';
2043
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
2044
+
2045
+ {
2046
+ if (typeof fn === 'function') {
2047
+ componentFrameCache.set(fn, syntheticFrame);
2048
+ }
2049
+ }
2050
+
2051
+ return syntheticFrame;
2052
+ }
2053
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
2054
+ {
2055
+ return describeNativeComponentFrame(fn, false);
2056
+ }
2057
+ }
2058
+
2059
+ function shouldConstruct(Component) {
2060
+ var prototype = Component.prototype;
2061
+ return !!(prototype && prototype.isReactComponent);
2062
+ }
2063
+
2064
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2065
+
2066
+ if (type == null) {
2067
+ return '';
2068
+ }
2069
+
2070
+ if (typeof type === 'function') {
2071
+ {
2072
+ return describeNativeComponentFrame(type, shouldConstruct(type));
2073
+ }
2074
+ }
2075
+
2076
+ if (typeof type === 'string') {
2077
+ return describeBuiltInComponentFrame(type);
2078
+ }
2079
+
2080
+ switch (type) {
2081
+ case REACT_SUSPENSE_TYPE:
2082
+ return describeBuiltInComponentFrame('Suspense');
2083
+
2084
+ case REACT_SUSPENSE_LIST_TYPE:
2085
+ return describeBuiltInComponentFrame('SuspenseList');
2086
+ }
2087
+
2088
+ if (typeof type === 'object') {
2089
+ switch (type.$$typeof) {
2090
+ case REACT_FORWARD_REF_TYPE:
2091
+ return describeFunctionComponentFrame(type.render);
2092
+
2093
+ case REACT_MEMO_TYPE:
2094
+ // Memo may contain any component type so we recursively resolve it.
2095
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2096
+
2097
+ case REACT_LAZY_TYPE:
2098
+ {
2099
+ var lazyComponent = type;
2100
+ var payload = lazyComponent._payload;
2101
+ var init = lazyComponent._init;
2102
+
2103
+ try {
2104
+ // Lazy may contain any component type so we recursively resolve it.
2105
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2106
+ } catch (x) {}
2107
+ }
2108
+ }
2109
+ }
2110
+
2111
+ return '';
2112
+ }
2113
+
2114
+ var loggedTypeFailures = {};
2115
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2116
+
2117
+ function setCurrentlyValidatingElement(element) {
2118
+ {
2119
+ if (element) {
2120
+ var owner = element._owner;
2121
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2122
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2123
+ } else {
2124
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2125
+ }
2126
+ }
2127
+ }
2128
+
2129
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
2130
+ {
2131
+ // $FlowFixMe This is okay but Flow doesn't know it.
2132
+ var has = Function.call.bind(hasOwnProperty);
2133
+
2134
+ for (var typeSpecName in typeSpecs) {
2135
+ if (has(typeSpecs, typeSpecName)) {
2136
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
2137
+ // fail the render phase where it didn't fail before. So we log it.
2138
+ // After these have been cleaned up, we'll let them throw.
2139
+
2140
+ try {
2141
+ // This is intentionally an invariant that gets caught. It's the same
2142
+ // behavior as without this statement except with a better message.
2143
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
2144
+ // eslint-disable-next-line react-internal/prod-error-codes
2145
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
2146
+ err.name = 'Invariant Violation';
2147
+ throw err;
2148
+ }
2149
+
2150
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
2151
+ } catch (ex) {
2152
+ error$1 = ex;
2153
+ }
2154
+
2155
+ if (error$1 && !(error$1 instanceof Error)) {
2156
+ setCurrentlyValidatingElement(element);
2157
+
2158
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
2159
+
2160
+ setCurrentlyValidatingElement(null);
2161
+ }
2162
+
2163
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2164
+ // Only monitor this failure once because there tends to be a lot of the
2165
+ // same error.
2166
+ loggedTypeFailures[error$1.message] = true;
2167
+ setCurrentlyValidatingElement(element);
2168
+
2169
+ error('Failed %s type: %s', location, error$1.message);
2170
+
2171
+ setCurrentlyValidatingElement(null);
2172
+ }
2173
+ }
2174
+ }
2175
+ }
2176
+ }
2177
+
2178
+ function setCurrentlyValidatingElement$1(element) {
2179
+ {
2180
+ if (element) {
2181
+ var owner = element._owner;
2182
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2183
+ setExtraStackFrame(stack);
2184
+ } else {
2185
+ setExtraStackFrame(null);
2186
+ }
2187
+ }
2188
+ }
2189
+
2190
+ var propTypesMisspellWarningShown;
2191
+
2192
+ {
2193
+ propTypesMisspellWarningShown = false;
2194
+ }
2195
+
2196
+ function getDeclarationErrorAddendum() {
2197
+ if (ReactCurrentOwner.current) {
2198
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
2199
+
2200
+ if (name) {
2201
+ return '\n\nCheck the render method of `' + name + '`.';
2202
+ }
2203
+ }
2204
+
2205
+ return '';
2206
+ }
2207
+
2208
+ function getSourceInfoErrorAddendum(source) {
2209
+ if (source !== undefined) {
2210
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2211
+ var lineNumber = source.lineNumber;
2212
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2213
+ }
2214
+
2215
+ return '';
2216
+ }
2217
+
2218
+ function getSourceInfoErrorAddendumForProps(elementProps) {
2219
+ if (elementProps !== null && elementProps !== undefined) {
2220
+ return getSourceInfoErrorAddendum(elementProps.__source);
2221
+ }
2222
+
2223
+ return '';
2224
+ }
2225
+ /**
2226
+ * Warn if there's no key explicitly set on dynamic arrays of children or
2227
+ * object keys are not valid. This allows us to keep track of children between
2228
+ * updates.
2229
+ */
2230
+
2231
+
2232
+ var ownerHasKeyUseWarning = {};
2233
+
2234
+ function getCurrentComponentErrorInfo(parentType) {
2235
+ var info = getDeclarationErrorAddendum();
2236
+
2237
+ if (!info) {
2238
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2239
+
2240
+ if (parentName) {
2241
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2242
+ }
2243
+ }
2244
+
2245
+ return info;
2246
+ }
2247
+ /**
2248
+ * Warn if the element doesn't have an explicit key assigned to it.
2249
+ * This element is in an array. The array could grow and shrink or be
2250
+ * reordered. All children that haven't already been validated are required to
2251
+ * have a "key" property assigned to it. Error statuses are cached so a warning
2252
+ * will only be shown once.
2253
+ *
2254
+ * @internal
2255
+ * @param {ReactElement} element Element that requires a key.
2256
+ * @param {*} parentType element's parent's type.
2257
+ */
2258
+
2259
+
2260
+ function validateExplicitKey(element, parentType) {
2261
+ if (!element._store || element._store.validated || element.key != null) {
2262
+ return;
2263
+ }
2264
+
2265
+ element._store.validated = true;
2266
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2267
+
2268
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2269
+ return;
2270
+ }
2271
+
2272
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
2273
+ // property, it may be the creator of the child that's responsible for
2274
+ // assigning it a key.
2275
+
2276
+ var childOwner = '';
2277
+
2278
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2279
+ // Give the component that originally created this child.
2280
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2281
+ }
2282
+
2283
+ {
2284
+ setCurrentlyValidatingElement$1(element);
2285
+
2286
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
2287
+
2288
+ setCurrentlyValidatingElement$1(null);
2289
+ }
2290
+ }
2291
+ /**
2292
+ * Ensure that every element either is passed in a static location, in an
2293
+ * array with an explicit keys property defined, or in an object literal
2294
+ * with valid key property.
2295
+ *
2296
+ * @internal
2297
+ * @param {ReactNode} node Statically passed child of any type.
2298
+ * @param {*} parentType node's parent's type.
2299
+ */
2300
+
2301
+
2302
+ function validateChildKeys(node, parentType) {
2303
+ if (typeof node !== 'object') {
2304
+ return;
2305
+ }
2306
+
2307
+ if (isArray(node)) {
2308
+ for (var i = 0; i < node.length; i++) {
2309
+ var child = node[i];
2310
+
2311
+ if (isValidElement(child)) {
2312
+ validateExplicitKey(child, parentType);
2313
+ }
2314
+ }
2315
+ } else if (isValidElement(node)) {
2316
+ // This element was passed in a valid location.
2317
+ if (node._store) {
2318
+ node._store.validated = true;
2319
+ }
2320
+ } else if (node) {
2321
+ var iteratorFn = getIteratorFn(node);
2322
+
2323
+ if (typeof iteratorFn === 'function') {
2324
+ // Entry iterators used to provide implicit keys,
2325
+ // but now we print a separate warning for them later.
2326
+ if (iteratorFn !== node.entries) {
2327
+ var iterator = iteratorFn.call(node);
2328
+ var step;
2329
+
2330
+ while (!(step = iterator.next()).done) {
2331
+ if (isValidElement(step.value)) {
2332
+ validateExplicitKey(step.value, parentType);
2333
+ }
2334
+ }
2335
+ }
2336
+ }
2337
+ }
2338
+ }
2339
+ /**
2340
+ * Given an element, validate that its props follow the propTypes definition,
2341
+ * provided by the type.
2342
+ *
2343
+ * @param {ReactElement} element
2344
+ */
2345
+
2346
+
2347
+ function validatePropTypes(element) {
2348
+ {
2349
+ var type = element.type;
2350
+
2351
+ if (type === null || type === undefined || typeof type === 'string') {
2352
+ return;
2353
+ }
2354
+
2355
+ var propTypes;
2356
+
2357
+ if (typeof type === 'function') {
2358
+ propTypes = type.propTypes;
2359
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
2360
+ // Inner props are checked in the reconciler.
2361
+ type.$$typeof === REACT_MEMO_TYPE)) {
2362
+ propTypes = type.propTypes;
2363
+ } else {
2364
+ return;
2365
+ }
2366
+
2367
+ if (propTypes) {
2368
+ // Intentionally inside to avoid triggering lazy initializers:
2369
+ var name = getComponentNameFromType(type);
2370
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
2371
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
2372
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
2373
+
2374
+ var _name = getComponentNameFromType(type);
2375
+
2376
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
2377
+ }
2378
+
2379
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
2380
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
2381
+ }
2382
+ }
2383
+ }
2384
+ /**
2385
+ * Given a fragment, validate that it can only be provided with fragment props
2386
+ * @param {ReactElement} fragment
2387
+ */
2388
+
2389
+
2390
+ function validateFragmentProps(fragment) {
2391
+ {
2392
+ var keys = Object.keys(fragment.props);
2393
+
2394
+ for (var i = 0; i < keys.length; i++) {
2395
+ var key = keys[i];
2396
+
2397
+ if (key !== 'children' && key !== 'key') {
2398
+ setCurrentlyValidatingElement$1(fragment);
2399
+
2400
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
2401
+
2402
+ setCurrentlyValidatingElement$1(null);
2403
+ break;
2404
+ }
2405
+ }
2406
+
2407
+ if (fragment.ref !== null) {
2408
+ setCurrentlyValidatingElement$1(fragment);
2409
+
2410
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
2411
+
2412
+ setCurrentlyValidatingElement$1(null);
2413
+ }
2414
+ }
2415
+ }
2416
+ function createElementWithValidation(type, props, children) {
2417
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
2418
+ // succeed and there will likely be errors in render.
2419
+
2420
+ if (!validType) {
2421
+ var info = '';
2422
+
2423
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2424
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
2425
+ }
2426
+
2427
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
2428
+
2429
+ if (sourceInfo) {
2430
+ info += sourceInfo;
2431
+ } else {
2432
+ info += getDeclarationErrorAddendum();
2433
+ }
2434
+
2435
+ var typeString;
2436
+
2437
+ if (type === null) {
2438
+ typeString = 'null';
2439
+ } else if (isArray(type)) {
2440
+ typeString = 'array';
2441
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
2442
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
2443
+ info = ' Did you accidentally export a JSX literal instead of a component?';
2444
+ } else {
2445
+ typeString = typeof type;
2446
+ }
2447
+
2448
+ {
2449
+ error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
2450
+ }
2451
+ }
2452
+
2453
+ var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
2454
+ // TODO: Drop this when these are no longer allowed as the type argument.
2455
+
2456
+ if (element == null) {
2457
+ return element;
2458
+ } // Skip key warning if the type isn't valid since our key validation logic
2459
+ // doesn't expect a non-string/function type and can throw confusing errors.
2460
+ // We don't want exception behavior to differ between dev and prod.
2461
+ // (Rendering will throw with a helpful message and as soon as the type is
2462
+ // fixed, the key warnings will appear.)
2463
+
2464
+
2465
+ if (validType) {
2466
+ for (var i = 2; i < arguments.length; i++) {
2467
+ validateChildKeys(arguments[i], type);
2468
+ }
2469
+ }
2470
+
2471
+ if (type === REACT_FRAGMENT_TYPE) {
2472
+ validateFragmentProps(element);
2473
+ } else {
2474
+ validatePropTypes(element);
2475
+ }
2476
+
2477
+ return element;
2478
+ }
2479
+ var didWarnAboutDeprecatedCreateFactory = false;
2480
+ function createFactoryWithValidation(type) {
2481
+ var validatedFactory = createElementWithValidation.bind(null, type);
2482
+ validatedFactory.type = type;
2483
+
2484
+ {
2485
+ if (!didWarnAboutDeprecatedCreateFactory) {
2486
+ didWarnAboutDeprecatedCreateFactory = true;
2487
+
2488
+ warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
2489
+ } // Legacy hook: remove it
2490
+
2491
+
2492
+ Object.defineProperty(validatedFactory, 'type', {
2493
+ enumerable: false,
2494
+ get: function () {
2495
+ warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
2496
+
2497
+ Object.defineProperty(this, 'type', {
2498
+ value: type
2499
+ });
2500
+ return type;
2501
+ }
2502
+ });
2503
+ }
2504
+
2505
+ return validatedFactory;
2506
+ }
2507
+ function cloneElementWithValidation(element, props, children) {
2508
+ var newElement = cloneElement.apply(this, arguments);
2509
+
2510
+ for (var i = 2; i < arguments.length; i++) {
2511
+ validateChildKeys(arguments[i], newElement.type);
2512
+ }
2513
+
2514
+ validatePropTypes(newElement);
2515
+ return newElement;
2516
+ }
2517
+
2518
+ function startTransition(scope, options) {
2519
+ var prevTransition = ReactCurrentBatchConfig.transition;
2520
+ ReactCurrentBatchConfig.transition = {};
2521
+ var currentTransition = ReactCurrentBatchConfig.transition;
2522
+
2523
+ {
2524
+ ReactCurrentBatchConfig.transition._updatedFibers = new Set();
2525
+ }
2526
+
2527
+ try {
2528
+ scope();
2529
+ } finally {
2530
+ ReactCurrentBatchConfig.transition = prevTransition;
2531
+
2532
+ {
2533
+ if (prevTransition === null && currentTransition._updatedFibers) {
2534
+ var updatedFibersCount = currentTransition._updatedFibers.size;
2535
+
2536
+ if (updatedFibersCount > 10) {
2537
+ warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
2538
+ }
2539
+
2540
+ currentTransition._updatedFibers.clear();
2541
+ }
2542
+ }
2543
+ }
2544
+ }
2545
+
2546
+ var didWarnAboutMessageChannel = false;
2547
+ var enqueueTaskImpl = null;
2548
+ function enqueueTask(task) {
2549
+ if (enqueueTaskImpl === null) {
2550
+ try {
2551
+ // read require off the module object to get around the bundlers.
2552
+ // we don't want them to detect a require and bundle a Node polyfill.
2553
+ var requireString = ('require' + Math.random()).slice(0, 7);
2554
+ var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
2555
+ // version of setImmediate, bypassing fake timers if any.
2556
+
2557
+ enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
2558
+ } catch (_err) {
2559
+ // we're in a browser
2560
+ // we can't use regular timers because they may still be faked
2561
+ // so we try MessageChannel+postMessage instead
2562
+ enqueueTaskImpl = function (callback) {
2563
+ {
2564
+ if (didWarnAboutMessageChannel === false) {
2565
+ didWarnAboutMessageChannel = true;
2566
+
2567
+ if (typeof MessageChannel === 'undefined') {
2568
+ error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
2569
+ }
2570
+ }
2571
+ }
2572
+
2573
+ var channel = new MessageChannel();
2574
+ channel.port1.onmessage = callback;
2575
+ channel.port2.postMessage(undefined);
2576
+ };
2577
+ }
2578
+ }
2579
+
2580
+ return enqueueTaskImpl(task);
2581
+ }
2582
+
2583
+ var actScopeDepth = 0;
2584
+ var didWarnNoAwaitAct = false;
2585
+ function act(callback) {
2586
+ {
2587
+ // `act` calls can be nested, so we track the depth. This represents the
2588
+ // number of `act` scopes on the stack.
2589
+ var prevActScopeDepth = actScopeDepth;
2590
+ actScopeDepth++;
2591
+
2592
+ if (ReactCurrentActQueue.current === null) {
2593
+ // This is the outermost `act` scope. Initialize the queue. The reconciler
2594
+ // will detect the queue and use it instead of Scheduler.
2595
+ ReactCurrentActQueue.current = [];
2596
+ }
2597
+
2598
+ var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
2599
+ var result;
2600
+
2601
+ try {
2602
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
2603
+ // set to `true` while the given callback is executed, not for updates
2604
+ // triggered during an async event, because this is how the legacy
2605
+ // implementation of `act` behaved.
2606
+ ReactCurrentActQueue.isBatchingLegacy = true;
2607
+ result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
2608
+ // which flushed updates immediately after the scope function exits, even
2609
+ // if it's an async function.
2610
+
2611
+ if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
2612
+ var queue = ReactCurrentActQueue.current;
2613
+
2614
+ if (queue !== null) {
2615
+ ReactCurrentActQueue.didScheduleLegacyUpdate = false;
2616
+ flushActQueue(queue);
2617
+ }
2618
+ }
2619
+ } catch (error) {
2620
+ popActScope(prevActScopeDepth);
2621
+ throw error;
2622
+ } finally {
2623
+ ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
2624
+ }
2625
+
2626
+ if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
2627
+ var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
2628
+ // for it to resolve before exiting the current scope.
2629
+
2630
+ var wasAwaited = false;
2631
+ var thenable = {
2632
+ then: function (resolve, reject) {
2633
+ wasAwaited = true;
2634
+ thenableResult.then(function (returnValue) {
2635
+ popActScope(prevActScopeDepth);
2636
+
2637
+ if (actScopeDepth === 0) {
2638
+ // We've exited the outermost act scope. Recursively flush the
2639
+ // queue until there's no remaining work.
2640
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2641
+ } else {
2642
+ resolve(returnValue);
2643
+ }
2644
+ }, function (error) {
2645
+ // The callback threw an error.
2646
+ popActScope(prevActScopeDepth);
2647
+ reject(error);
2648
+ });
2649
+ }
2650
+ };
2651
+
2652
+ {
2653
+ if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
2654
+ // eslint-disable-next-line no-undef
2655
+ Promise.resolve().then(function () {}).then(function () {
2656
+ if (!wasAwaited) {
2657
+ didWarnNoAwaitAct = true;
2658
+
2659
+ error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
2660
+ }
2661
+ });
2662
+ }
2663
+ }
2664
+
2665
+ return thenable;
2666
+ } else {
2667
+ var returnValue = result; // The callback is not an async function. Exit the current scope
2668
+ // immediately, without awaiting.
2669
+
2670
+ popActScope(prevActScopeDepth);
2671
+
2672
+ if (actScopeDepth === 0) {
2673
+ // Exiting the outermost act scope. Flush the queue.
2674
+ var _queue = ReactCurrentActQueue.current;
2675
+
2676
+ if (_queue !== null) {
2677
+ flushActQueue(_queue);
2678
+ ReactCurrentActQueue.current = null;
2679
+ } // Return a thenable. If the user awaits it, we'll flush again in
2680
+ // case additional work was scheduled by a microtask.
2681
+
2682
+
2683
+ var _thenable = {
2684
+ then: function (resolve, reject) {
2685
+ // Confirm we haven't re-entered another `act` scope, in case
2686
+ // the user does something weird like await the thenable
2687
+ // multiple times.
2688
+ if (ReactCurrentActQueue.current === null) {
2689
+ // Recursively flush the queue until there's no remaining work.
2690
+ ReactCurrentActQueue.current = [];
2691
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2692
+ } else {
2693
+ resolve(returnValue);
2694
+ }
2695
+ }
2696
+ };
2697
+ return _thenable;
2698
+ } else {
2699
+ // Since we're inside a nested `act` scope, the returned thenable
2700
+ // immediately resolves. The outer scope will flush the queue.
2701
+ var _thenable2 = {
2702
+ then: function (resolve, reject) {
2703
+ resolve(returnValue);
2704
+ }
2705
+ };
2706
+ return _thenable2;
2707
+ }
2708
+ }
2709
+ }
2710
+ }
2711
+
2712
+ function popActScope(prevActScopeDepth) {
2713
+ {
2714
+ if (prevActScopeDepth !== actScopeDepth - 1) {
2715
+ error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
2716
+ }
2717
+
2718
+ actScopeDepth = prevActScopeDepth;
2719
+ }
2720
+ }
2721
+
2722
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
2723
+ {
2724
+ var queue = ReactCurrentActQueue.current;
2725
+
2726
+ if (queue !== null) {
2727
+ try {
2728
+ flushActQueue(queue);
2729
+ enqueueTask(function () {
2730
+ if (queue.length === 0) {
2731
+ // No additional work was scheduled. Finish.
2732
+ ReactCurrentActQueue.current = null;
2733
+ resolve(returnValue);
2734
+ } else {
2735
+ // Keep flushing work until there's none left.
2736
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2737
+ }
2738
+ });
2739
+ } catch (error) {
2740
+ reject(error);
2741
+ }
2742
+ } else {
2743
+ resolve(returnValue);
2744
+ }
2745
+ }
2746
+ }
2747
+
2748
+ var isFlushing = false;
2749
+
2750
+ function flushActQueue(queue) {
2751
+ {
2752
+ if (!isFlushing) {
2753
+ // Prevent re-entrance.
2754
+ isFlushing = true;
2755
+ var i = 0;
2756
+
2757
+ try {
2758
+ for (; i < queue.length; i++) {
2759
+ var callback = queue[i];
2760
+
2761
+ do {
2762
+ callback = callback(true);
2763
+ } while (callback !== null);
2764
+ }
2765
+
2766
+ queue.length = 0;
2767
+ } catch (error) {
2768
+ // If something throws, leave the remaining callbacks on the queue.
2769
+ queue = queue.slice(i + 1);
2770
+ throw error;
2771
+ } finally {
2772
+ isFlushing = false;
2773
+ }
2774
+ }
2775
+ }
2776
+ }
2777
+
2778
+ var createElement$1 = createElementWithValidation ;
2779
+ var cloneElement$1 = cloneElementWithValidation ;
2780
+ var createFactory = createFactoryWithValidation ;
2781
+ var Children = {
2782
+ map: mapChildren,
2783
+ forEach: forEachChildren,
2784
+ count: countChildren,
2785
+ toArray: toArray,
2786
+ only: onlyChild
2787
+ };
2788
+
2789
+ exports.Children = Children;
2790
+ exports.Component = Component;
2791
+ exports.Fragment = REACT_FRAGMENT_TYPE;
2792
+ exports.Profiler = REACT_PROFILER_TYPE;
2793
+ exports.PureComponent = PureComponent;
2794
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
2795
+ exports.Suspense = REACT_SUSPENSE_TYPE;
2796
+ exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
2797
+ exports.cloneElement = cloneElement$1;
2798
+ exports.createContext = createContext;
2799
+ exports.createElement = createElement$1;
2800
+ exports.createFactory = createFactory;
2801
+ exports.createRef = createRef;
2802
+ exports.forwardRef = forwardRef;
2803
+ exports.isValidElement = isValidElement;
2804
+ exports.lazy = lazy;
2805
+ exports.memo = memo;
2806
+ exports.startTransition = startTransition;
2807
+ exports.unstable_act = act;
2808
+ exports.useCallback = useCallback;
2809
+ exports.useContext = useContext;
2810
+ exports.useDebugValue = useDebugValue;
2811
+ exports.useDeferredValue = useDeferredValue;
2812
+ exports.useEffect = useEffect;
2813
+ exports.useId = useId;
2814
+ exports.useImperativeHandle = useImperativeHandle;
2815
+ exports.useInsertionEffect = useInsertionEffect;
2816
+ exports.useLayoutEffect = useLayoutEffect;
2817
+ exports.useMemo = useMemo;
2818
+ exports.useReducer = useReducer;
2819
+ exports.useRef = useRef;
2820
+ exports.useState = useState;
2821
+ exports.useSyncExternalStore = useSyncExternalStore;
2822
+ exports.useTransition = useTransition;
2823
+ exports.version = ReactVersion;
2824
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
2825
+ if (
2826
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
2827
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
2828
+ 'function'
2829
+ ) {
2830
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2831
+ }
2832
+
2833
+ })();
2834
+ }
2835
+ } (react_development, react_development.exports));
2836
+ return react_development.exports;
2837
+ }
2838
+
2839
+ if (process.env.NODE_ENV === 'production') {
2840
+ react.exports = requireReact_production_min();
2841
+ } else {
2842
+ react.exports = requireReact_development();
2843
+ }
2844
+
2845
+ var reactExports = react.exports;
2846
+
2847
+ /**
2848
+ * @license React
2849
+ * react-jsx-runtime.production.min.js
2850
+ *
2851
+ * Copyright (c) Facebook, Inc. and its affiliates.
2852
+ *
2853
+ * This source code is licensed under the MIT license found in the
2854
+ * LICENSE file in the root directory of this source tree.
2855
+ */
2856
+
2857
+ var hasRequiredReactJsxRuntime_production_min;
2858
+
2859
+ function requireReactJsxRuntime_production_min () {
2860
+ if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
2861
+ hasRequiredReactJsxRuntime_production_min = 1;
2862
+ var f=reactExports,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
2863
+ function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
2864
+ return reactJsxRuntime_production_min;
2865
+ }
2866
+
2867
+ var reactJsxRuntime_development = {};
2868
+
2869
+ /**
2870
+ * @license React
2871
+ * react-jsx-runtime.development.js
2872
+ *
2873
+ * Copyright (c) Facebook, Inc. and its affiliates.
2874
+ *
2875
+ * This source code is licensed under the MIT license found in the
2876
+ * LICENSE file in the root directory of this source tree.
2877
+ */
2878
+
2879
+ var hasRequiredReactJsxRuntime_development;
2880
+
2881
+ function requireReactJsxRuntime_development () {
2882
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
2883
+ hasRequiredReactJsxRuntime_development = 1;
2884
+
2885
+ if (process.env.NODE_ENV !== "production") {
2886
+ (function() {
2887
+
2888
+ var React = reactExports;
2889
+
2890
+ // ATTENTION
2891
+ // When adding new symbols to this file,
2892
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
2893
+ // The Symbol used to tag the ReactElement-like types.
2894
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
2895
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
2896
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
2897
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
2898
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
2899
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
2900
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
2901
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
2902
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
2903
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
2904
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
2905
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
2906
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
2907
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2908
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
2909
+ function getIteratorFn(maybeIterable) {
2910
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
2911
+ return null;
2912
+ }
2913
+
2914
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2915
+
2916
+ if (typeof maybeIterator === 'function') {
2917
+ return maybeIterator;
2918
+ }
2919
+
2920
+ return null;
2921
+ }
2922
+
2923
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2924
+
2925
+ function error(format) {
2926
+ {
2927
+ {
2928
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2929
+ args[_key2 - 1] = arguments[_key2];
2930
+ }
2931
+
2932
+ printWarning('error', format, args);
2933
+ }
2934
+ }
2935
+ }
2936
+
2937
+ function printWarning(level, format, args) {
2938
+ // When changing this logic, you might want to also
2939
+ // update consoleWithStackDev.www.js as well.
2940
+ {
2941
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2942
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
2943
+
2944
+ if (stack !== '') {
2945
+ format += '%s';
2946
+ args = args.concat([stack]);
2947
+ } // eslint-disable-next-line react-internal/safe-string-coercion
2948
+
2949
+
2950
+ var argsWithFormat = args.map(function (item) {
2951
+ return String(item);
2952
+ }); // Careful: RN currently depends on this prefix
2953
+
2954
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
2955
+ // breaks IE9: https://github.com/facebook/react/issues/13610
2956
+ // eslint-disable-next-line react-internal/no-production-logging
2957
+
2958
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
2959
+ }
2960
+ }
2961
+
2962
+ // -----------------------------------------------------------------------------
2963
+
2964
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
2965
+ var enableCacheElement = false;
2966
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
2967
+
2968
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
2969
+ // stuff. Intended to enable React core members to more easily debug scheduling
2970
+ // issues in DEV builds.
2971
+
2972
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
2973
+
2974
+ var REACT_MODULE_REFERENCE;
2975
+
2976
+ {
2977
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
2978
+ }
2979
+
2980
+ function isValidElementType(type) {
2981
+ if (typeof type === 'string' || typeof type === 'function') {
2982
+ return true;
2983
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
2984
+
2985
+
2986
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
2987
+ return true;
2988
+ }
2989
+
2990
+ if (typeof type === 'object' && type !== null) {
2991
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
2992
+ // types supported by any Flight configuration anywhere since
2993
+ // we don't know which Flight build this will end up being used
2994
+ // with.
2995
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
2996
+ return true;
2997
+ }
2998
+ }
2999
+
3000
+ return false;
3001
+ }
3002
+
3003
+ function getWrappedName(outerType, innerType, wrapperName) {
3004
+ var displayName = outerType.displayName;
3005
+
3006
+ if (displayName) {
3007
+ return displayName;
3008
+ }
3009
+
3010
+ var functionName = innerType.displayName || innerType.name || '';
3011
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
3012
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
3013
+
3014
+
3015
+ function getContextName(type) {
3016
+ return type.displayName || 'Context';
3017
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
3018
+
3019
+
3020
+ function getComponentNameFromType(type) {
3021
+ if (type == null) {
3022
+ // Host root, text node or just invalid type.
3023
+ return null;
3024
+ }
3025
+
3026
+ {
3027
+ if (typeof type.tag === 'number') {
3028
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
3029
+ }
3030
+ }
3031
+
3032
+ if (typeof type === 'function') {
3033
+ return type.displayName || type.name || null;
3034
+ }
3035
+
3036
+ if (typeof type === 'string') {
3037
+ return type;
3038
+ }
3039
+
3040
+ switch (type) {
3041
+ case REACT_FRAGMENT_TYPE:
3042
+ return 'Fragment';
3043
+
3044
+ case REACT_PORTAL_TYPE:
3045
+ return 'Portal';
3046
+
3047
+ case REACT_PROFILER_TYPE:
3048
+ return 'Profiler';
3049
+
3050
+ case REACT_STRICT_MODE_TYPE:
3051
+ return 'StrictMode';
3052
+
3053
+ case REACT_SUSPENSE_TYPE:
3054
+ return 'Suspense';
3055
+
3056
+ case REACT_SUSPENSE_LIST_TYPE:
3057
+ return 'SuspenseList';
3058
+
3059
+ }
3060
+
3061
+ if (typeof type === 'object') {
3062
+ switch (type.$$typeof) {
3063
+ case REACT_CONTEXT_TYPE:
3064
+ var context = type;
3065
+ return getContextName(context) + '.Consumer';
3066
+
3067
+ case REACT_PROVIDER_TYPE:
3068
+ var provider = type;
3069
+ return getContextName(provider._context) + '.Provider';
3070
+
3071
+ case REACT_FORWARD_REF_TYPE:
3072
+ return getWrappedName(type, type.render, 'ForwardRef');
3073
+
3074
+ case REACT_MEMO_TYPE:
3075
+ var outerName = type.displayName || null;
3076
+
3077
+ if (outerName !== null) {
3078
+ return outerName;
3079
+ }
3080
+
3081
+ return getComponentNameFromType(type.type) || 'Memo';
3082
+
3083
+ case REACT_LAZY_TYPE:
3084
+ {
3085
+ var lazyComponent = type;
3086
+ var payload = lazyComponent._payload;
3087
+ var init = lazyComponent._init;
3088
+
3089
+ try {
3090
+ return getComponentNameFromType(init(payload));
3091
+ } catch (x) {
3092
+ return null;
3093
+ }
3094
+ }
3095
+
3096
+ // eslint-disable-next-line no-fallthrough
3097
+ }
3098
+ }
3099
+
3100
+ return null;
3101
+ }
3102
+
3103
+ var assign = Object.assign;
3104
+
3105
+ // Helpers to patch console.logs to avoid logging during side-effect free
3106
+ // replaying on render function. This currently only patches the object
3107
+ // lazily which won't cover if the log function was extracted eagerly.
3108
+ // We could also eagerly patch the method.
3109
+ var disabledDepth = 0;
3110
+ var prevLog;
3111
+ var prevInfo;
3112
+ var prevWarn;
3113
+ var prevError;
3114
+ var prevGroup;
3115
+ var prevGroupCollapsed;
3116
+ var prevGroupEnd;
3117
+
3118
+ function disabledLog() {}
3119
+
3120
+ disabledLog.__reactDisabledLog = true;
3121
+ function disableLogs() {
3122
+ {
3123
+ if (disabledDepth === 0) {
3124
+ /* eslint-disable react-internal/no-production-logging */
3125
+ prevLog = console.log;
3126
+ prevInfo = console.info;
3127
+ prevWarn = console.warn;
3128
+ prevError = console.error;
3129
+ prevGroup = console.group;
3130
+ prevGroupCollapsed = console.groupCollapsed;
3131
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
3132
+
3133
+ var props = {
3134
+ configurable: true,
3135
+ enumerable: true,
3136
+ value: disabledLog,
3137
+ writable: true
3138
+ }; // $FlowFixMe Flow thinks console is immutable.
3139
+
3140
+ Object.defineProperties(console, {
3141
+ info: props,
3142
+ log: props,
3143
+ warn: props,
3144
+ error: props,
3145
+ group: props,
3146
+ groupCollapsed: props,
3147
+ groupEnd: props
3148
+ });
3149
+ /* eslint-enable react-internal/no-production-logging */
3150
+ }
3151
+
3152
+ disabledDepth++;
3153
+ }
3154
+ }
3155
+ function reenableLogs() {
3156
+ {
3157
+ disabledDepth--;
3158
+
3159
+ if (disabledDepth === 0) {
3160
+ /* eslint-disable react-internal/no-production-logging */
3161
+ var props = {
3162
+ configurable: true,
3163
+ enumerable: true,
3164
+ writable: true
3165
+ }; // $FlowFixMe Flow thinks console is immutable.
3166
+
3167
+ Object.defineProperties(console, {
3168
+ log: assign({}, props, {
3169
+ value: prevLog
3170
+ }),
3171
+ info: assign({}, props, {
3172
+ value: prevInfo
3173
+ }),
3174
+ warn: assign({}, props, {
3175
+ value: prevWarn
3176
+ }),
3177
+ error: assign({}, props, {
3178
+ value: prevError
3179
+ }),
3180
+ group: assign({}, props, {
3181
+ value: prevGroup
3182
+ }),
3183
+ groupCollapsed: assign({}, props, {
3184
+ value: prevGroupCollapsed
3185
+ }),
3186
+ groupEnd: assign({}, props, {
3187
+ value: prevGroupEnd
3188
+ })
3189
+ });
3190
+ /* eslint-enable react-internal/no-production-logging */
3191
+ }
3192
+
3193
+ if (disabledDepth < 0) {
3194
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
3195
+ }
3196
+ }
3197
+ }
3198
+
3199
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
3200
+ var prefix;
3201
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
3202
+ {
3203
+ if (prefix === undefined) {
3204
+ // Extract the VM specific prefix used by each line.
3205
+ try {
3206
+ throw Error();
3207
+ } catch (x) {
3208
+ var match = x.stack.trim().match(/\n( *(at )?)/);
3209
+ prefix = match && match[1] || '';
3210
+ }
3211
+ } // We use the prefix to ensure our stacks line up with native stack frames.
3212
+
3213
+
3214
+ return '\n' + prefix + name;
3215
+ }
3216
+ }
3217
+ var reentry = false;
3218
+ var componentFrameCache;
3219
+
3220
+ {
3221
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
3222
+ componentFrameCache = new PossiblyWeakMap();
3223
+ }
3224
+
3225
+ function describeNativeComponentFrame(fn, construct) {
3226
+ // If something asked for a stack inside a fake render, it should get ignored.
3227
+ if ( !fn || reentry) {
3228
+ return '';
3229
+ }
3230
+
3231
+ {
3232
+ var frame = componentFrameCache.get(fn);
3233
+
3234
+ if (frame !== undefined) {
3235
+ return frame;
3236
+ }
3237
+ }
3238
+
3239
+ var control;
3240
+ reentry = true;
3241
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
3242
+
3243
+ Error.prepareStackTrace = undefined;
3244
+ var previousDispatcher;
3245
+
3246
+ {
3247
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
3248
+ // for warnings.
3249
+
3250
+ ReactCurrentDispatcher.current = null;
3251
+ disableLogs();
3252
+ }
3253
+
3254
+ try {
3255
+ // This should throw.
3256
+ if (construct) {
3257
+ // Something should be setting the props in the constructor.
3258
+ var Fake = function () {
3259
+ throw Error();
3260
+ }; // $FlowFixMe
3261
+
3262
+
3263
+ Object.defineProperty(Fake.prototype, 'props', {
3264
+ set: function () {
3265
+ // We use a throwing setter instead of frozen or non-writable props
3266
+ // because that won't throw in a non-strict mode function.
3267
+ throw Error();
3268
+ }
3269
+ });
3270
+
3271
+ if (typeof Reflect === 'object' && Reflect.construct) {
3272
+ // We construct a different control for this case to include any extra
3273
+ // frames added by the construct call.
3274
+ try {
3275
+ Reflect.construct(Fake, []);
3276
+ } catch (x) {
3277
+ control = x;
3278
+ }
3279
+
3280
+ Reflect.construct(fn, [], Fake);
3281
+ } else {
3282
+ try {
3283
+ Fake.call();
3284
+ } catch (x) {
3285
+ control = x;
3286
+ }
3287
+
3288
+ fn.call(Fake.prototype);
3289
+ }
3290
+ } else {
3291
+ try {
3292
+ throw Error();
3293
+ } catch (x) {
3294
+ control = x;
3295
+ }
3296
+
3297
+ fn();
3298
+ }
3299
+ } catch (sample) {
3300
+ // This is inlined manually because closure doesn't do it for us.
3301
+ if (sample && control && typeof sample.stack === 'string') {
3302
+ // This extracts the first frame from the sample that isn't also in the control.
3303
+ // Skipping one frame that we assume is the frame that calls the two.
3304
+ var sampleLines = sample.stack.split('\n');
3305
+ var controlLines = control.stack.split('\n');
3306
+ var s = sampleLines.length - 1;
3307
+ var c = controlLines.length - 1;
3308
+
3309
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
3310
+ // We expect at least one stack frame to be shared.
3311
+ // Typically this will be the root most one. However, stack frames may be
3312
+ // cut off due to maximum stack limits. In this case, one maybe cut off
3313
+ // earlier than the other. We assume that the sample is longer or the same
3314
+ // and there for cut off earlier. So we should find the root most frame in
3315
+ // the sample somewhere in the control.
3316
+ c--;
3317
+ }
3318
+
3319
+ for (; s >= 1 && c >= 0; s--, c--) {
3320
+ // Next we find the first one that isn't the same which should be the
3321
+ // frame that called our sample function and the control.
3322
+ if (sampleLines[s] !== controlLines[c]) {
3323
+ // In V8, the first line is describing the message but other VMs don't.
3324
+ // If we're about to return the first line, and the control is also on the same
3325
+ // line, that's a pretty good indicator that our sample threw at same line as
3326
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
3327
+ // This can happen if you passed a class to function component, or non-function.
3328
+ if (s !== 1 || c !== 1) {
3329
+ do {
3330
+ s--;
3331
+ c--; // We may still have similar intermediate frames from the construct call.
3332
+ // The next one that isn't the same should be our match though.
3333
+
3334
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
3335
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
3336
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
3337
+ // but we have a user-provided "displayName"
3338
+ // splice it in to make the stack more readable.
3339
+
3340
+
3341
+ if (fn.displayName && _frame.includes('<anonymous>')) {
3342
+ _frame = _frame.replace('<anonymous>', fn.displayName);
3343
+ }
3344
+
3345
+ {
3346
+ if (typeof fn === 'function') {
3347
+ componentFrameCache.set(fn, _frame);
3348
+ }
3349
+ } // Return the line we found.
3350
+
3351
+
3352
+ return _frame;
3353
+ }
3354
+ } while (s >= 1 && c >= 0);
3355
+ }
3356
+
3357
+ break;
3358
+ }
3359
+ }
3360
+ }
3361
+ } finally {
3362
+ reentry = false;
3363
+
3364
+ {
3365
+ ReactCurrentDispatcher.current = previousDispatcher;
3366
+ reenableLogs();
3367
+ }
3368
+
3369
+ Error.prepareStackTrace = previousPrepareStackTrace;
3370
+ } // Fallback to just using the name if we couldn't make it throw.
3371
+
3372
+
3373
+ var name = fn ? fn.displayName || fn.name : '';
3374
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
3375
+
3376
+ {
3377
+ if (typeof fn === 'function') {
3378
+ componentFrameCache.set(fn, syntheticFrame);
3379
+ }
3380
+ }
3381
+
3382
+ return syntheticFrame;
3383
+ }
3384
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
3385
+ {
3386
+ return describeNativeComponentFrame(fn, false);
3387
+ }
3388
+ }
3389
+
3390
+ function shouldConstruct(Component) {
3391
+ var prototype = Component.prototype;
3392
+ return !!(prototype && prototype.isReactComponent);
3393
+ }
3394
+
3395
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
3396
+
3397
+ if (type == null) {
3398
+ return '';
3399
+ }
3400
+
3401
+ if (typeof type === 'function') {
3402
+ {
3403
+ return describeNativeComponentFrame(type, shouldConstruct(type));
3404
+ }
3405
+ }
3406
+
3407
+ if (typeof type === 'string') {
3408
+ return describeBuiltInComponentFrame(type);
3409
+ }
3410
+
3411
+ switch (type) {
3412
+ case REACT_SUSPENSE_TYPE:
3413
+ return describeBuiltInComponentFrame('Suspense');
3414
+
3415
+ case REACT_SUSPENSE_LIST_TYPE:
3416
+ return describeBuiltInComponentFrame('SuspenseList');
3417
+ }
3418
+
3419
+ if (typeof type === 'object') {
3420
+ switch (type.$$typeof) {
3421
+ case REACT_FORWARD_REF_TYPE:
3422
+ return describeFunctionComponentFrame(type.render);
3423
+
3424
+ case REACT_MEMO_TYPE:
3425
+ // Memo may contain any component type so we recursively resolve it.
3426
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
3427
+
3428
+ case REACT_LAZY_TYPE:
3429
+ {
3430
+ var lazyComponent = type;
3431
+ var payload = lazyComponent._payload;
3432
+ var init = lazyComponent._init;
3433
+
3434
+ try {
3435
+ // Lazy may contain any component type so we recursively resolve it.
3436
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
3437
+ } catch (x) {}
3438
+ }
3439
+ }
3440
+ }
3441
+
3442
+ return '';
3443
+ }
3444
+
3445
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
3446
+
3447
+ var loggedTypeFailures = {};
3448
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
3449
+
3450
+ function setCurrentlyValidatingElement(element) {
3451
+ {
3452
+ if (element) {
3453
+ var owner = element._owner;
3454
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
3455
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
3456
+ } else {
3457
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
3458
+ }
3459
+ }
3460
+ }
3461
+
3462
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
3463
+ {
3464
+ // $FlowFixMe This is okay but Flow doesn't know it.
3465
+ var has = Function.call.bind(hasOwnProperty);
3466
+
3467
+ for (var typeSpecName in typeSpecs) {
3468
+ if (has(typeSpecs, typeSpecName)) {
3469
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
3470
+ // fail the render phase where it didn't fail before. So we log it.
3471
+ // After these have been cleaned up, we'll let them throw.
3472
+
3473
+ try {
3474
+ // This is intentionally an invariant that gets caught. It's the same
3475
+ // behavior as without this statement except with a better message.
3476
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
3477
+ // eslint-disable-next-line react-internal/prod-error-codes
3478
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
3479
+ err.name = 'Invariant Violation';
3480
+ throw err;
3481
+ }
3482
+
3483
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
3484
+ } catch (ex) {
3485
+ error$1 = ex;
3486
+ }
3487
+
3488
+ if (error$1 && !(error$1 instanceof Error)) {
3489
+ setCurrentlyValidatingElement(element);
3490
+
3491
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
3492
+
3493
+ setCurrentlyValidatingElement(null);
3494
+ }
3495
+
3496
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
3497
+ // Only monitor this failure once because there tends to be a lot of the
3498
+ // same error.
3499
+ loggedTypeFailures[error$1.message] = true;
3500
+ setCurrentlyValidatingElement(element);
3501
+
3502
+ error('Failed %s type: %s', location, error$1.message);
3503
+
3504
+ setCurrentlyValidatingElement(null);
3505
+ }
3506
+ }
3507
+ }
3508
+ }
3509
+ }
3510
+
3511
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
3512
+
3513
+ function isArray(a) {
3514
+ return isArrayImpl(a);
3515
+ }
3516
+
3517
+ /*
3518
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
3519
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
3520
+ *
3521
+ * The functions in this module will throw an easier-to-understand,
3522
+ * easier-to-debug exception with a clear errors message message explaining the
3523
+ * problem. (Instead of a confusing exception thrown inside the implementation
3524
+ * of the `value` object).
3525
+ */
3526
+ // $FlowFixMe only called in DEV, so void return is not possible.
3527
+ function typeName(value) {
3528
+ {
3529
+ // toStringTag is needed for namespaced types like Temporal.Instant
3530
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
3531
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
3532
+ return type;
3533
+ }
3534
+ } // $FlowFixMe only called in DEV, so void return is not possible.
3535
+
3536
+
3537
+ function willCoercionThrow(value) {
3538
+ {
3539
+ try {
3540
+ testStringCoercion(value);
3541
+ return false;
3542
+ } catch (e) {
3543
+ return true;
3544
+ }
3545
+ }
3546
+ }
3547
+
3548
+ function testStringCoercion(value) {
3549
+ // If you ended up here by following an exception call stack, here's what's
3550
+ // happened: you supplied an object or symbol value to React (as a prop, key,
3551
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
3552
+ // coerce it to a string using `'' + value`, an exception was thrown.
3553
+ //
3554
+ // The most common types that will cause this exception are `Symbol` instances
3555
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
3556
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
3557
+ // exception. (Library authors do this to prevent users from using built-in
3558
+ // numeric operators like `+` or comparison operators like `>=` because custom
3559
+ // methods are needed to perform accurate arithmetic or comparison.)
3560
+ //
3561
+ // To fix the problem, coerce this object or symbol value to a string before
3562
+ // passing it to React. The most reliable way is usually `String(value)`.
3563
+ //
3564
+ // To find which value is throwing, check the browser or debugger console.
3565
+ // Before this exception was thrown, there should be `console.error` output
3566
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
3567
+ // problem and how that type was used: key, atrribute, input value prop, etc.
3568
+ // In most cases, this console output also shows the component and its
3569
+ // ancestor components where the exception happened.
3570
+ //
3571
+ // eslint-disable-next-line react-internal/safe-string-coercion
3572
+ return '' + value;
3573
+ }
3574
+ function checkKeyStringCoercion(value) {
3575
+ {
3576
+ if (willCoercionThrow(value)) {
3577
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
3578
+
3579
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
3580
+ }
3581
+ }
3582
+ }
3583
+
3584
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
3585
+ var RESERVED_PROPS = {
3586
+ key: true,
3587
+ ref: true,
3588
+ __self: true,
3589
+ __source: true
3590
+ };
3591
+ var specialPropKeyWarningShown;
3592
+ var specialPropRefWarningShown;
3593
+ var didWarnAboutStringRefs;
3594
+
3595
+ {
3596
+ didWarnAboutStringRefs = {};
3597
+ }
3598
+
3599
+ function hasValidRef(config) {
3600
+ {
3601
+ if (hasOwnProperty.call(config, 'ref')) {
3602
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
3603
+
3604
+ if (getter && getter.isReactWarning) {
3605
+ return false;
3606
+ }
3607
+ }
3608
+ }
3609
+
3610
+ return config.ref !== undefined;
3611
+ }
3612
+
3613
+ function hasValidKey(config) {
3614
+ {
3615
+ if (hasOwnProperty.call(config, 'key')) {
3616
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
3617
+
3618
+ if (getter && getter.isReactWarning) {
3619
+ return false;
3620
+ }
3621
+ }
3622
+ }
3623
+
3624
+ return config.key !== undefined;
3625
+ }
3626
+
3627
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
3628
+ {
3629
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
3630
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
3631
+
3632
+ if (!didWarnAboutStringRefs[componentName]) {
3633
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
3634
+
3635
+ didWarnAboutStringRefs[componentName] = true;
3636
+ }
3637
+ }
3638
+ }
3639
+ }
3640
+
3641
+ function defineKeyPropWarningGetter(props, displayName) {
3642
+ {
3643
+ var warnAboutAccessingKey = function () {
3644
+ if (!specialPropKeyWarningShown) {
3645
+ specialPropKeyWarningShown = true;
3646
+
3647
+ error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
3648
+ }
3649
+ };
3650
+
3651
+ warnAboutAccessingKey.isReactWarning = true;
3652
+ Object.defineProperty(props, 'key', {
3653
+ get: warnAboutAccessingKey,
3654
+ configurable: true
3655
+ });
3656
+ }
3657
+ }
3658
+
3659
+ function defineRefPropWarningGetter(props, displayName) {
3660
+ {
3661
+ var warnAboutAccessingRef = function () {
3662
+ if (!specialPropRefWarningShown) {
3663
+ specialPropRefWarningShown = true;
3664
+
3665
+ error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
3666
+ }
3667
+ };
3668
+
3669
+ warnAboutAccessingRef.isReactWarning = true;
3670
+ Object.defineProperty(props, 'ref', {
3671
+ get: warnAboutAccessingRef,
3672
+ configurable: true
3673
+ });
3674
+ }
3675
+ }
3676
+ /**
3677
+ * Factory method to create a new React element. This no longer adheres to
3678
+ * the class pattern, so do not use new to call it. Also, instanceof check
3679
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
3680
+ * if something is a React Element.
3681
+ *
3682
+ * @param {*} type
3683
+ * @param {*} props
3684
+ * @param {*} key
3685
+ * @param {string|object} ref
3686
+ * @param {*} owner
3687
+ * @param {*} self A *temporary* helper to detect places where `this` is
3688
+ * different from the `owner` when React.createElement is called, so that we
3689
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
3690
+ * functions, and as long as `this` and owner are the same, there will be no
3691
+ * change in behavior.
3692
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
3693
+ * indicating filename, line number, and/or other information.
3694
+ * @internal
3695
+ */
3696
+
3697
+
3698
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
3699
+ var element = {
3700
+ // This tag allows us to uniquely identify this as a React Element
3701
+ $$typeof: REACT_ELEMENT_TYPE,
3702
+ // Built-in properties that belong on the element
3703
+ type: type,
3704
+ key: key,
3705
+ ref: ref,
3706
+ props: props,
3707
+ // Record the component responsible for creating this element.
3708
+ _owner: owner
3709
+ };
3710
+
3711
+ {
3712
+ // The validation flag is currently mutative. We put it on
3713
+ // an external backing store so that we can freeze the whole object.
3714
+ // This can be replaced with a WeakMap once they are implemented in
3715
+ // commonly used development environments.
3716
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
3717
+ // the validation flag non-enumerable (where possible, which should
3718
+ // include every environment we run tests in), so the test framework
3719
+ // ignores it.
3720
+
3721
+ Object.defineProperty(element._store, 'validated', {
3722
+ configurable: false,
3723
+ enumerable: false,
3724
+ writable: true,
3725
+ value: false
3726
+ }); // self and source are DEV only properties.
3727
+
3728
+ Object.defineProperty(element, '_self', {
3729
+ configurable: false,
3730
+ enumerable: false,
3731
+ writable: false,
3732
+ value: self
3733
+ }); // Two elements created in two different places should be considered
3734
+ // equal for testing purposes and therefore we hide it from enumeration.
3735
+
3736
+ Object.defineProperty(element, '_source', {
3737
+ configurable: false,
3738
+ enumerable: false,
3739
+ writable: false,
3740
+ value: source
3741
+ });
3742
+
3743
+ if (Object.freeze) {
3744
+ Object.freeze(element.props);
3745
+ Object.freeze(element);
3746
+ }
3747
+ }
3748
+
3749
+ return element;
3750
+ };
3751
+ /**
3752
+ * https://github.com/reactjs/rfcs/pull/107
3753
+ * @param {*} type
3754
+ * @param {object} props
3755
+ * @param {string} key
3756
+ */
3757
+
3758
+ function jsxDEV(type, config, maybeKey, source, self) {
3759
+ {
3760
+ var propName; // Reserved names are extracted
3761
+
3762
+ var props = {};
3763
+ var key = null;
3764
+ var ref = null; // Currently, key can be spread in as a prop. This causes a potential
3765
+ // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
3766
+ // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
3767
+ // but as an intermediary step, we will use jsxDEV for everything except
3768
+ // <div {...props} key="Hi" />, because we aren't currently able to tell if
3769
+ // key is explicitly declared to be undefined or not.
3770
+
3771
+ if (maybeKey !== undefined) {
3772
+ {
3773
+ checkKeyStringCoercion(maybeKey);
3774
+ }
3775
+
3776
+ key = '' + maybeKey;
3777
+ }
3778
+
3779
+ if (hasValidKey(config)) {
3780
+ {
3781
+ checkKeyStringCoercion(config.key);
3782
+ }
3783
+
3784
+ key = '' + config.key;
3785
+ }
3786
+
3787
+ if (hasValidRef(config)) {
3788
+ ref = config.ref;
3789
+ warnIfStringRefCannotBeAutoConverted(config, self);
3790
+ } // Remaining properties are added to a new props object
3791
+
3792
+
3793
+ for (propName in config) {
3794
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
3795
+ props[propName] = config[propName];
3796
+ }
3797
+ } // Resolve default props
3798
+
3799
+
3800
+ if (type && type.defaultProps) {
3801
+ var defaultProps = type.defaultProps;
3802
+
3803
+ for (propName in defaultProps) {
3804
+ if (props[propName] === undefined) {
3805
+ props[propName] = defaultProps[propName];
3806
+ }
3807
+ }
3808
+ }
3809
+
3810
+ if (key || ref) {
3811
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
3812
+
3813
+ if (key) {
3814
+ defineKeyPropWarningGetter(props, displayName);
3815
+ }
3816
+
3817
+ if (ref) {
3818
+ defineRefPropWarningGetter(props, displayName);
3819
+ }
3820
+ }
3821
+
3822
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
3823
+ }
3824
+ }
3825
+
3826
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
3827
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
3828
+
3829
+ function setCurrentlyValidatingElement$1(element) {
3830
+ {
3831
+ if (element) {
3832
+ var owner = element._owner;
3833
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
3834
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
3835
+ } else {
3836
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
3837
+ }
3838
+ }
3839
+ }
3840
+
3841
+ var propTypesMisspellWarningShown;
3842
+
3843
+ {
3844
+ propTypesMisspellWarningShown = false;
3845
+ }
3846
+ /**
3847
+ * Verifies the object is a ReactElement.
3848
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
3849
+ * @param {?object} object
3850
+ * @return {boolean} True if `object` is a ReactElement.
3851
+ * @final
3852
+ */
3853
+
3854
+
3855
+ function isValidElement(object) {
3856
+ {
3857
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
3858
+ }
3859
+ }
3860
+
3861
+ function getDeclarationErrorAddendum() {
3862
+ {
3863
+ if (ReactCurrentOwner$1.current) {
3864
+ var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
3865
+
3866
+ if (name) {
3867
+ return '\n\nCheck the render method of `' + name + '`.';
3868
+ }
3869
+ }
3870
+
3871
+ return '';
3872
+ }
3873
+ }
3874
+
3875
+ function getSourceInfoErrorAddendum(source) {
3876
+ {
3877
+
3878
+ return '';
3879
+ }
3880
+ }
3881
+ /**
3882
+ * Warn if there's no key explicitly set on dynamic arrays of children or
3883
+ * object keys are not valid. This allows us to keep track of children between
3884
+ * updates.
3885
+ */
3886
+
3887
+
3888
+ var ownerHasKeyUseWarning = {};
3889
+
3890
+ function getCurrentComponentErrorInfo(parentType) {
3891
+ {
3892
+ var info = getDeclarationErrorAddendum();
3893
+
3894
+ if (!info) {
3895
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
3896
+
3897
+ if (parentName) {
3898
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
3899
+ }
3900
+ }
3901
+
3902
+ return info;
3903
+ }
3904
+ }
3905
+ /**
3906
+ * Warn if the element doesn't have an explicit key assigned to it.
3907
+ * This element is in an array. The array could grow and shrink or be
3908
+ * reordered. All children that haven't already been validated are required to
3909
+ * have a "key" property assigned to it. Error statuses are cached so a warning
3910
+ * will only be shown once.
3911
+ *
3912
+ * @internal
3913
+ * @param {ReactElement} element Element that requires a key.
3914
+ * @param {*} parentType element's parent's type.
3915
+ */
3916
+
3917
+
3918
+ function validateExplicitKey(element, parentType) {
3919
+ {
3920
+ if (!element._store || element._store.validated || element.key != null) {
3921
+ return;
3922
+ }
3923
+
3924
+ element._store.validated = true;
3925
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
3926
+
3927
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
3928
+ return;
3929
+ }
3930
+
3931
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
3932
+ // property, it may be the creator of the child that's responsible for
3933
+ // assigning it a key.
3934
+
3935
+ var childOwner = '';
3936
+
3937
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
3938
+ // Give the component that originally created this child.
3939
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
3940
+ }
3941
+
3942
+ setCurrentlyValidatingElement$1(element);
3943
+
3944
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
3945
+
3946
+ setCurrentlyValidatingElement$1(null);
3947
+ }
3948
+ }
3949
+ /**
3950
+ * Ensure that every element either is passed in a static location, in an
3951
+ * array with an explicit keys property defined, or in an object literal
3952
+ * with valid key property.
3953
+ *
3954
+ * @internal
3955
+ * @param {ReactNode} node Statically passed child of any type.
3956
+ * @param {*} parentType node's parent's type.
3957
+ */
3958
+
3959
+
3960
+ function validateChildKeys(node, parentType) {
3961
+ {
3962
+ if (typeof node !== 'object') {
3963
+ return;
3964
+ }
3965
+
3966
+ if (isArray(node)) {
3967
+ for (var i = 0; i < node.length; i++) {
3968
+ var child = node[i];
3969
+
3970
+ if (isValidElement(child)) {
3971
+ validateExplicitKey(child, parentType);
3972
+ }
3973
+ }
3974
+ } else if (isValidElement(node)) {
3975
+ // This element was passed in a valid location.
3976
+ if (node._store) {
3977
+ node._store.validated = true;
3978
+ }
3979
+ } else if (node) {
3980
+ var iteratorFn = getIteratorFn(node);
3981
+
3982
+ if (typeof iteratorFn === 'function') {
3983
+ // Entry iterators used to provide implicit keys,
3984
+ // but now we print a separate warning for them later.
3985
+ if (iteratorFn !== node.entries) {
3986
+ var iterator = iteratorFn.call(node);
3987
+ var step;
3988
+
3989
+ while (!(step = iterator.next()).done) {
3990
+ if (isValidElement(step.value)) {
3991
+ validateExplicitKey(step.value, parentType);
3992
+ }
3993
+ }
3994
+ }
3995
+ }
3996
+ }
3997
+ }
3998
+ }
3999
+ /**
4000
+ * Given an element, validate that its props follow the propTypes definition,
4001
+ * provided by the type.
4002
+ *
4003
+ * @param {ReactElement} element
4004
+ */
4005
+
4006
+
4007
+ function validatePropTypes(element) {
4008
+ {
4009
+ var type = element.type;
4010
+
4011
+ if (type === null || type === undefined || typeof type === 'string') {
4012
+ return;
4013
+ }
4014
+
4015
+ var propTypes;
4016
+
4017
+ if (typeof type === 'function') {
4018
+ propTypes = type.propTypes;
4019
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
4020
+ // Inner props are checked in the reconciler.
4021
+ type.$$typeof === REACT_MEMO_TYPE)) {
4022
+ propTypes = type.propTypes;
4023
+ } else {
4024
+ return;
4025
+ }
4026
+
4027
+ if (propTypes) {
4028
+ // Intentionally inside to avoid triggering lazy initializers:
4029
+ var name = getComponentNameFromType(type);
4030
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
4031
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
4032
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
4033
+
4034
+ var _name = getComponentNameFromType(type);
4035
+
4036
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
4037
+ }
4038
+
4039
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
4040
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
4041
+ }
4042
+ }
4043
+ }
4044
+ /**
4045
+ * Given a fragment, validate that it can only be provided with fragment props
4046
+ * @param {ReactElement} fragment
4047
+ */
4048
+
4049
+
4050
+ function validateFragmentProps(fragment) {
4051
+ {
4052
+ var keys = Object.keys(fragment.props);
4053
+
4054
+ for (var i = 0; i < keys.length; i++) {
4055
+ var key = keys[i];
4056
+
4057
+ if (key !== 'children' && key !== 'key') {
4058
+ setCurrentlyValidatingElement$1(fragment);
4059
+
4060
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
4061
+
4062
+ setCurrentlyValidatingElement$1(null);
4063
+ break;
4064
+ }
4065
+ }
4066
+
4067
+ if (fragment.ref !== null) {
4068
+ setCurrentlyValidatingElement$1(fragment);
4069
+
4070
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
4071
+
4072
+ setCurrentlyValidatingElement$1(null);
4073
+ }
4074
+ }
4075
+ }
4076
+
4077
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
4078
+ {
4079
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
4080
+ // succeed and there will likely be errors in render.
4081
+
4082
+ if (!validType) {
4083
+ var info = '';
4084
+
4085
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
4086
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
4087
+ }
4088
+
4089
+ var sourceInfo = getSourceInfoErrorAddendum();
4090
+
4091
+ if (sourceInfo) {
4092
+ info += sourceInfo;
4093
+ } else {
4094
+ info += getDeclarationErrorAddendum();
4095
+ }
4096
+
4097
+ var typeString;
4098
+
4099
+ if (type === null) {
4100
+ typeString = 'null';
4101
+ } else if (isArray(type)) {
4102
+ typeString = 'array';
4103
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
4104
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
4105
+ info = ' Did you accidentally export a JSX literal instead of a component?';
4106
+ } else {
4107
+ typeString = typeof type;
4108
+ }
4109
+
4110
+ error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
4111
+ }
4112
+
4113
+ var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
4114
+ // TODO: Drop this when these are no longer allowed as the type argument.
4115
+
4116
+ if (element == null) {
4117
+ return element;
4118
+ } // Skip key warning if the type isn't valid since our key validation logic
4119
+ // doesn't expect a non-string/function type and can throw confusing errors.
4120
+ // We don't want exception behavior to differ between dev and prod.
4121
+ // (Rendering will throw with a helpful message and as soon as the type is
4122
+ // fixed, the key warnings will appear.)
4123
+
4124
+
4125
+ if (validType) {
4126
+ var children = props.children;
4127
+
4128
+ if (children !== undefined) {
4129
+ if (isStaticChildren) {
4130
+ if (isArray(children)) {
4131
+ for (var i = 0; i < children.length; i++) {
4132
+ validateChildKeys(children[i], type);
4133
+ }
4134
+
4135
+ if (Object.freeze) {
4136
+ Object.freeze(children);
4137
+ }
4138
+ } else {
4139
+ error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
4140
+ }
4141
+ } else {
4142
+ validateChildKeys(children, type);
4143
+ }
4144
+ }
4145
+ }
4146
+
4147
+ if (type === REACT_FRAGMENT_TYPE) {
4148
+ validateFragmentProps(element);
4149
+ } else {
4150
+ validatePropTypes(element);
4151
+ }
4152
+
4153
+ return element;
4154
+ }
4155
+ } // These two functions exist to still get child warnings in dev
4156
+ // even with the prod transform. This means that jsxDEV is purely
4157
+ // opt-in behavior for better messages but that we won't stop
4158
+ // giving you warnings if you use production apis.
4159
+
4160
+ function jsxWithValidationStatic(type, props, key) {
4161
+ {
4162
+ return jsxWithValidation(type, props, key, true);
4163
+ }
4164
+ }
4165
+ function jsxWithValidationDynamic(type, props, key) {
4166
+ {
4167
+ return jsxWithValidation(type, props, key, false);
4168
+ }
4169
+ }
4170
+
4171
+ var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
4172
+ // for now we can ship identical prod functions
4173
+
4174
+ var jsxs = jsxWithValidationStatic ;
4175
+
4176
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
4177
+ reactJsxRuntime_development.jsx = jsx;
4178
+ reactJsxRuntime_development.jsxs = jsxs;
4179
+ })();
4180
+ }
4181
+ return reactJsxRuntime_development;
4182
+ }
4183
+
4184
+ if (process.env.NODE_ENV === 'production') {
4185
+ jsxRuntime.exports = requireReactJsxRuntime_production_min();
4186
+ } else {
4187
+ jsxRuntime.exports = requireReactJsxRuntime_development();
4188
+ }
4189
+
4190
+ var jsxRuntimeExports = jsxRuntime.exports;
5
4191
 
6
4192
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
7
4193
 
@@ -2533,76 +6719,8 @@ const cn = (...inputs) => {
2533
6719
  return twMerge(clsx(inputs));
2534
6720
  };
2535
6721
 
2536
- const badgeSizeClassMap = {
2537
- sm: 'tw-w-4 tw-h-4',
2538
- md: 'tw-w-5 tw-h-5',
2539
- };
2540
- const mainImageSizeClassMap = {
2541
- sm: 'tw-w-8 tw-h-8',
2542
- md: 'tw-w-10 tw-h-10',
2543
- };
2544
- function BadgeImage({ imageUrl, badgeUrl, size = 'sm', extraMarginForBadge, rounded = false, }) {
2545
- return imageUrl ? (jsxRuntime.jsxs("div", { className: cn('tw-relative', extraMarginForBadge && badgeUrl ? 'tw-mr-1.5' : null, mainImageSizeClassMap[size]), children: [jsxRuntime.jsx("img", { src: imageUrl, alt: "", className: cn('tw-h-full tw-w-full', rounded ? ' tw-rounded-full' : 'tw-rounded-squid-xs') }), badgeUrl ? (jsxRuntime.jsx("img", { src: badgeUrl, alt: "", className: cn('tw-absolute -tw-right-1/3 tw-bottom-0 tw-z-10 tw-m-0 -tw-translate-x-1/3 tw-rounded-md tw-border-[1px] tw-border-grey-800', badgeSizeClassMap[size]) })) : null] })) : null;
2546
- }
2547
-
2548
- /******************************************************************************
2549
- Copyright (c) Microsoft Corporation.
2550
-
2551
- Permission to use, copy, modify, and/or distribute this software for any
2552
- purpose with or without fee is hereby granted.
2553
-
2554
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2555
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2556
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2557
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2558
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2559
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2560
- PERFORMANCE OF THIS SOFTWARE.
2561
- ***************************************************************************** */
2562
- /* global Reflect, Promise, SuppressedError, Symbol */
2563
-
2564
-
2565
- function __rest(s, e) {
2566
- var t = {};
2567
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2568
- t[p] = s[p];
2569
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
2570
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2571
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2572
- t[p[i]] = s[p[i]];
2573
- }
2574
- return t;
2575
- }
2576
-
2577
- function __awaiter(thisArg, _arguments, P, generator) {
2578
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2579
- return new (P || (P = Promise))(function (resolve, reject) {
2580
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2581
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2582
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2583
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2584
- });
2585
- }
2586
-
2587
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2588
- var e = new Error(message);
2589
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2590
- };
2591
-
2592
- function CaptionText(_a) {
2593
- var { children, bold } = _a, props = __rest(_a, ["children", "bold"]);
2594
- const boldClass = bold
2595
- ? 'tw-font-typography-bold'
2596
- : 'tw-font-typography-regular';
2597
- return (jsxRuntime.jsx("span", Object.assign({}, props, { className: cn(boldClass, 'tw-text-caption tw-leading-caption', props.className), children: children })));
2598
- }
2599
-
2600
- function UsdAmount({ usdAmount }) {
2601
- return (jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-text-grey-500", children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500/65", children: "$" }), jsxRuntime.jsx(CaptionText, { children: usdAmount.toString() })] }));
2602
- }
2603
-
2604
6722
  // font size, line height, and letter spacing classes
2605
- const textClassMap$1 = {
6723
+ const textClassMap = {
2606
6724
  small: 'tw-text-body-small tw-tracking-body-small tw-leading-body-small',
2607
6725
  medium: 'tw-text-body-medium tw-tracking-body-medium tw-leading-body-medium',
2608
6726
  large: 'tw-text-body-large tw-tracking-body-large tw-leading-body-large',
@@ -2612,54 +6730,51 @@ function BodyText(_a) {
2612
6730
  const fontWeightClass = bold
2613
6731
  ? 'tw-font-typography-bold'
2614
6732
  : 'tw-font-typography-regular';
2615
- return (jsxRuntime.jsx("span", Object.assign({}, props, { className: cn(textClassMap$1[size], fontWeightClass, props.className), children: children })));
6733
+ return (jsxRuntimeExports.jsx("span", Object.assign({}, props, { className: cn(textClassMap[size], fontWeightClass, props.className), children: children })));
2616
6734
  }
2617
6735
 
2618
6736
  function Loader({ size = '24' }) {
2619
6737
  return (
2620
6738
  // <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
2621
- jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 38 38", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("defs", { children: jsxRuntime.jsxs("linearGradient", { x1: "8.042%", y1: "0%", x2: "65.682%", y2: "23.865%", id: "a", children: [jsxRuntime.jsx("stop", { stopColor: "currentColor", stopOpacity: "0", offset: "0%" }), jsxRuntime.jsx("stop", { stopColor: "currentColor", stopOpacity: ".631", offset: "63.146%" }), jsxRuntime.jsx("stop", { stopColor: "currentColor", offset: "100%" })] }) }), jsxRuntime.jsx("g", { fill: "none", fillRule: "evenodd", children: jsxRuntime.jsxs("g", { transform: "translate(1 1)", children: [jsxRuntime.jsx("path", { d: "M36 18c0-9.94-8.06-18-18-18", id: "Oval-2", stroke: "url(#a)", strokeWidth: "2", children: jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" }) }), jsxRuntime.jsx("circle", { fill: "currentColor", cx: "36", cy: "18", r: "1", children: jsxRuntime.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" }) })] }) })] }));
6739
+ jsxRuntimeExports.jsxs("svg", { width: size, height: size, viewBox: "0 0 38 38", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntimeExports.jsx("defs", { children: jsxRuntimeExports.jsxs("linearGradient", { x1: "8.042%", y1: "0%", x2: "65.682%", y2: "23.865%", id: "a", children: [jsxRuntimeExports.jsx("stop", { stopColor: "currentColor", stopOpacity: "0", offset: "0%" }), jsxRuntimeExports.jsx("stop", { stopColor: "currentColor", stopOpacity: ".631", offset: "63.146%" }), jsxRuntimeExports.jsx("stop", { stopColor: "currentColor", offset: "100%" })] }) }), jsxRuntimeExports.jsx("g", { fill: "none", fillRule: "evenodd", children: jsxRuntimeExports.jsxs("g", { transform: "translate(1 1)", children: [jsxRuntimeExports.jsx("path", { d: "M36 18c0-9.94-8.06-18-18-18", id: "Oval-2", stroke: "url(#a)", strokeWidth: "2", children: jsxRuntimeExports.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" }) }), jsxRuntimeExports.jsx("circle", { fill: "currentColor", cx: "36", cy: "18", r: "1", children: jsxRuntimeExports.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" }) })] }) })] }));
6740
+ }
6741
+
6742
+ const badgeSizeClassMap = {
6743
+ sm: 'tw-w-4 tw-h-4',
6744
+ md: 'tw-w-5 tw-h-5',
6745
+ };
6746
+ const mainImageSizeClassMap = {
6747
+ sm: 'tw-w-8 tw-h-8',
6748
+ md: 'tw-w-10 tw-h-10',
6749
+ };
6750
+ function BadgeImage({ imageUrl, badgeUrl, size = 'sm', extraMarginForBadge, rounded = false, }) {
6751
+ return imageUrl ? (jsxRuntimeExports.jsxs("div", { className: cn('tw-relative', extraMarginForBadge && badgeUrl ? 'tw-mr-1.5' : null, mainImageSizeClassMap[size]), children: [jsxRuntimeExports.jsx("img", { src: imageUrl, alt: "", className: cn('tw-h-full tw-w-full', rounded ? ' tw-rounded-full' : 'tw-rounded-squid-xs') }), badgeUrl ? (jsxRuntimeExports.jsx("img", { src: badgeUrl, alt: "", className: cn('tw-absolute -tw-right-1/3 tw-bottom-0 tw-z-10 tw-m-0 -tw-translate-x-1/3 tw-rounded-md tw-border-[1px] tw-border-grey-800', badgeSizeClassMap[size]) })) : null] })) : null;
2622
6752
  }
2623
6753
 
2624
6754
  function AddressButton(_a) {
2625
6755
  var { label, imageUrl, badgeUrl, isLoading } = _a, props = __rest(_a, ["label", "imageUrl", "badgeUrl", "isLoading"]);
2626
- return (jsxRuntime.jsx("button", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-xl tw-w-fit tw-min-w-squid-xxl tw-items-center tw-gap-1.5 tw-rounded-squid-m tw-border tw-border-material-light-thin tw-bg-grey-800 tw-text-grey-300', !isLoading && imageUrl ? 'tw-pl-1 tw-pr-4' : 'tw-px-4', props.className), children: isLoading ? (jsxRuntime.jsx("span", { className: "tw-mx-auto tw-px-4", children: jsxRuntime.jsx(Loader, {}) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BadgeImage, { imageUrl: imageUrl, badgeUrl: badgeUrl, extraMarginForBadge: true, rounded: true }), jsxRuntime.jsx(BodyText, { size: "small", children: label })] })) })));
6756
+ return (jsxRuntimeExports.jsx("button", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-xl tw-w-fit tw-min-w-squid-xxl tw-items-center tw-gap-1.5 tw-rounded-squid-m tw-border tw-border-material-light-thin tw-bg-grey-800 tw-text-grey-300', !isLoading && imageUrl ? 'tw-pl-1 tw-pr-4' : 'tw-px-4', props.className), children: isLoading ? (jsxRuntimeExports.jsx("span", { className: "tw-mx-auto tw-px-4", children: jsxRuntimeExports.jsx(Loader, {}) })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(BadgeImage, { imageUrl: imageUrl, badgeUrl: badgeUrl, extraMarginForBadge: true, rounded: true }), jsxRuntimeExports.jsx(BodyText, { size: "small", children: label })] })) })));
2627
6757
  }
2628
6758
 
2629
6759
  function ArrowRightIcon() {
2630
- return (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M14 6L20 12L14 18M19 12H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
6760
+ return (jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntimeExports.jsx("path", { d: "M14 6L20 12L14 18M19 12H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
2631
6761
  }
2632
6762
  function ChevronArrowIcon() {
2633
- return (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M6.66663 14L9.64022 8.64754C9.86394 8.24484 9.86394 7.75519 9.64022 7.35249L6.66663 2", stroke: "currentColor", strokeOpacity: "0.66", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
2634
- }
2635
- function ArrowTriangle() {
2636
- return (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M2.87921 5.55701C2.21562 4.22933 3.18052 2.6665 4.66531 2.6665H11.3348C12.8196 2.6665 13.7845 4.22933 13.1209 5.55701L9.78615 12.229C9.05029 13.7012 6.94983 13.7012 6.21397 12.229L2.87921 5.55701Z", fill: "currentColor" }) }));
2637
- }
2638
- function ChevronLargeDownIcon({ size = '24' }) {
2639
- return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M3 10.5L11.0287 14.9604C11.6328 15.296 12.3672 15.296 12.9713 14.9604L21 10.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
2640
- }
2641
- function ChevronLargeRightIcon() {
2642
- return (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M6.66675 14L9.64035 8.64754C9.86407 8.24484 9.86407 7.75519 9.64035 7.35249L6.66675 2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
2643
- }
2644
- function ChevronRightSmallIcon() {
2645
- return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: jsxRuntime.jsx("path", { d: "M6.66675 10.6667L8.86201 8.47141C9.12236 8.21106 9.12236 7.78896 8.86201 7.52861L6.66675 5.33334", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
2646
- }
2647
- function ArrowLeftIcon() {
2648
- return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M10 6L4 12L10 18M5 12H20", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
6763
+ return (jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntimeExports.jsx("path", { d: "M6.66663 14L9.64022 8.64754C9.86394 8.24484 9.86394 7.75519 9.64022 7.35249L6.66663 2", stroke: "currentColor", strokeOpacity: "0.66", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
2649
6764
  }
2650
6765
 
2651
6766
  function ArrowButton(_a) {
2652
6767
  var { label, disabled } = _a, props = __rest(_a, ["label", "disabled"]);
2653
- return (jsxRuntime.jsxs("button", Object.assign({}, props, { disabled: disabled, className: clsx('tw-flex tw-h-button tw-w-full tw-items-center tw-justify-between tw-gap-1 tw-rounded-full tw-border tw-border-material-light-thin tw-bg-grey-800 tw-p-1 tw-text-grey-300',
6768
+ return (jsxRuntimeExports.jsxs("button", Object.assign({}, props, { disabled: disabled, className: clsx('tw-flex tw-h-button tw-w-full tw-items-center tw-justify-between tw-gap-1 tw-rounded-full tw-border tw-border-material-light-thin tw-bg-grey-800 tw-p-1 tw-text-grey-300',
2654
6769
  // disabled styles
2655
- 'disabled:tw-bg-grey-800 disabled:tw-text-grey-600'), children: [jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { size: "medium", children: label }) }), jsxRuntime.jsx("span", { "aria-disabled": disabled, className: clsx('tw-flex tw-aspect-square tw-h-[52px] tw-w-[52px] tw-items-center tw-justify-center tw-rounded-full tw-bg-royal-500 tw-text-grey-100',
6770
+ 'disabled:tw-bg-grey-800 disabled:tw-text-grey-600'), children: [jsxRuntimeExports.jsx("span", { className: "tw-px-squid-m", children: jsxRuntimeExports.jsx(BodyText, { size: "medium", children: label }) }), jsxRuntimeExports.jsx("span", { "aria-disabled": disabled, className: clsx('tw-flex tw-aspect-square tw-h-[52px] tw-w-[52px] tw-items-center tw-justify-center tw-rounded-full tw-bg-royal-500 tw-text-grey-100',
2656
6771
  // disabled styles
2657
- 'aria-disabled:tw-bg-grey-600 aria-disabled:tw-text-grey-800'), children: jsxRuntime.jsx(ArrowRightIcon, {}) })] })));
6772
+ 'aria-disabled:tw-bg-grey-600 aria-disabled:tw-text-grey-800'), children: jsxRuntimeExports.jsx(ArrowRightIcon, {}) })] })));
2658
6773
  }
2659
6774
 
2660
6775
  const animationDuration = '500ms';
2661
6776
  function BoostButton({ boostMode = 'normal', onToggleBoostMode, }) {
2662
- const boostIndicatorRef = react.useRef(null);
6777
+ const boostIndicatorRef = reactExports.useRef(null);
2663
6778
  function handleToggleBoostMode() {
2664
6779
  if (!boostIndicatorRef.current)
2665
6780
  return;
@@ -2675,9 +6790,9 @@ function BoostButton({ boostMode = 'normal', onToggleBoostMode, }) {
2675
6790
  onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'normal' });
2676
6791
  }
2677
6792
  }
2678
- return (jsxRuntime.jsxs("div", { onClick: handleToggleBoostMode, className: "tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-items-center tw-justify-between tw-transition-transform data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsxRuntime.jsx("div", { className: "tw-w-1/2 tw-text-center", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxRuntime.jsxs("div", { className: "tw-w-1/2 tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
6793
+ return (jsxRuntimeExports.jsxs("div", { onClick: handleToggleBoostMode, className: "tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsxRuntimeExports.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsxRuntimeExports.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxRuntimeExports.jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-items-center tw-justify-between tw-transition-transform data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsxRuntimeExports.jsx("div", { className: "tw-w-1/2 tw-text-center", children: jsxRuntimeExports.jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxRuntimeExports.jsxs("div", { className: "tw-w-1/2 tw-text-center", children: [jsxRuntimeExports.jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsxRuntimeExports.jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
2679
6794
  boxShadow: generateMarkerLines(40),
2680
- } })] }), jsxRuntime.jsx("div", { className: cn('tw-absolute tw-bottom-0.5 tw-left-[calc(50%-1.5px)] tw-z-20 tw-h-[10px] tw-w-[3px] tw-rounded-sm tw-transition-colors peer-data-[boost-mode=boost]:tw-bg-status-positive peer-data-[boost-mode=normal]:tw-bg-current', `tw-duration-${animationDuration}`) })] }));
6795
+ } })] }), jsxRuntimeExports.jsx("div", { className: cn('tw-absolute tw-bottom-0.5 tw-left-[calc(50%-1.5px)] tw-z-20 tw-h-[10px] tw-w-[3px] tw-rounded-sm tw-transition-colors peer-data-[boost-mode=boost]:tw-bg-status-positive peer-data-[boost-mode=normal]:tw-bg-current', `tw-duration-${animationDuration}`) })] }));
2681
6796
  }
2682
6797
  function generateMarkerLines(count) {
2683
6798
  const halfCount = Math.ceil(count / 2);
@@ -2705,166 +6820,32 @@ const buttonVariantClassMap = {
2705
6820
  const buttonDisabledClass = 'disabled:tw-bg-grey-800 disabled:tw-text-grey-600';
2706
6821
  function Button(_a) {
2707
6822
  var { label, disabled, size, variant, icon } = _a, props = __rest(_a, ["label", "disabled", "size", "variant", "icon"]);
2708
- return (jsxRuntime.jsx("button", Object.assign({}, props, { disabled: disabled, className: clsx(buttonSizeClassMap[size], buttonVariantClassMap[variant],
6823
+ return (jsxRuntimeExports.jsx("button", Object.assign({}, props, { disabled: disabled, className: clsx(buttonSizeClassMap[size], buttonVariantClassMap[variant],
2709
6824
  // disabled styles
2710
6825
  buttonDisabledClass,
2711
6826
  // custom classes from props
2712
- props.className), children: size === 'lg' ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
6827
+ props.className), children: size === 'lg' ? (jsxRuntimeExports.jsx("span", { className: "tw-px-squid-m", children: jsxRuntimeExports.jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
2713
6828
  // label only
2714
- jsxRuntime.jsx(BodyText, { size: "small", children: label })) : !label && icon ? (
6829
+ jsxRuntimeExports.jsx(BodyText, { size: "small", children: label })) : !label && icon ? (
2715
6830
  // icon only
2716
6831
  icon) : (
2717
6832
  // icon and label
2718
- jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null })));
6833
+ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [icon, jsxRuntimeExports.jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null })));
6834
+ }
6835
+
6836
+ function CaptionText(_a) {
6837
+ var { children, bold } = _a, props = __rest(_a, ["children", "bold"]);
6838
+ const boldClass = bold
6839
+ ? 'tw-font-typography-bold'
6840
+ : 'tw-font-typography-regular';
6841
+ return (jsxRuntimeExports.jsx("span", Object.assign({}, props, { className: cn(boldClass, 'tw-text-caption tw-leading-caption', props.className), children: children })));
2719
6842
  }
2720
6843
 
2721
6844
  function Chip(_a) {
2722
6845
  var { label, icon } = _a, props = __rest(_a, ["label", "icon"]);
2723
- return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-rounded-squid-m tw-bg-grey-500 tw-text-grey-900', icon && 'tw-w-squid-m', props.className), children: label ? (jsxRuntime.jsx(CaptionText, { className: "tw-min-w-squid-xl tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
6846
+ return (jsxRuntimeExports.jsx("div", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-rounded-squid-m tw-bg-grey-500 tw-text-grey-900', icon && 'tw-w-squid-m', props.className), children: label ? (jsxRuntimeExports.jsx(CaptionText, { className: "tw-min-w-squid-xl tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
2724
6847
  }
2725
6848
 
2726
- /**
2727
- * Mapping between readable variables name and css variables used TailwindCSS config
2728
- */
2729
- const themeTypesKeys = {
2730
- 'accent-gold': {
2731
- cssVariable: '--squid-theme-accent-gold',
2732
- },
2733
- 'accent-salmon': {
2734
- cssVariable: '--squid-theme-accent-salmon',
2735
- },
2736
- 'grey-100': {
2737
- cssVariable: '--squid-theme-grey-100',
2738
- },
2739
- 'grey-200': {
2740
- cssVariable: '--squid-theme-grey-200',
2741
- },
2742
- 'grey-300': {
2743
- cssVariable: '--squid-theme-grey-300',
2744
- },
2745
- 'grey-400': {
2746
- cssVariable: '--squid-theme-grey-400',
2747
- },
2748
- 'grey-500': {
2749
- cssVariable: '--squid-theme-grey-500',
2750
- },
2751
- 'grey-600': {
2752
- cssVariable: '--squid-theme-grey-600',
2753
- },
2754
- 'grey-700': {
2755
- cssVariable: '--squid-theme-grey-700',
2756
- },
2757
- 'grey-800': {
2758
- cssVariable: '--squid-theme-grey-800',
2759
- },
2760
- 'grey-900': {
2761
- cssVariable: '--squid-theme-grey-900',
2762
- },
2763
- 'material-dark-average': {
2764
- cssVariable: '--squid-theme-material-dark-average',
2765
- },
2766
- 'material-dark-thick': {
2767
- cssVariable: '--squid-theme-material-dark-thick',
2768
- },
2769
- 'material-dark-thin': {
2770
- cssVariable: '--squid-theme-material-dark-thin',
2771
- },
2772
- 'material-light-average': {
2773
- cssVariable: '--squid-theme-material-light-average',
2774
- },
2775
- 'material-light-thick': {
2776
- cssVariable: '--squid-theme-material-light-thick',
2777
- },
2778
- 'material-light-thin': {
2779
- cssVariable: '--squid-theme-material-light-thin',
2780
- },
2781
- 'royal-100': {
2782
- cssVariable: '--squid-theme-royal-100',
2783
- },
2784
- 'royal-200': {
2785
- cssVariable: '--squid-theme-royal-200',
2786
- },
2787
- 'royal-300': {
2788
- cssVariable: '--squid-theme-royal-300',
2789
- },
2790
- 'royal-400': {
2791
- cssVariable: '--squid-theme-royal-400',
2792
- },
2793
- 'royal-500': {
2794
- cssVariable: '--squid-theme-royal-500',
2795
- },
2796
- 'royal-600': {
2797
- cssVariable: '--squid-theme-royal-600',
2798
- },
2799
- 'royal-700': {
2800
- cssVariable: '--squid-theme-royal-700',
2801
- },
2802
- 'royal-800': {
2803
- cssVariable: '--squid-theme-royal-800',
2804
- },
2805
- 'status-negative': {
2806
- cssVariable: '--squid-theme-status-negative',
2807
- },
2808
- 'status-positive': {
2809
- cssVariable: '--squid-theme-status-positive',
2810
- },
2811
- 'volt-300': {
2812
- cssVariable: '--squid-theme-volt-300',
2813
- },
2814
- 'volt-400': {
2815
- cssVariable: '--squid-theme-volt-400',
2816
- },
2817
- 'volt-600': {
2818
- cssVariable: '--squid-theme-volt-600',
2819
- },
2820
- 'volt-700': {
2821
- cssVariable: '--squid-theme-volt-700',
2822
- },
2823
- 'volt-800': {
2824
- cssVariable: '--squid-theme-volt-800',
2825
- },
2826
- 'volt-900': {
2827
- cssVariable: '--squid-theme-volt-900',
2828
- },
2829
- };
2830
-
2831
- /**
2832
- * Parsing the user readable config to css variables with HSL values
2833
- * @param style
2834
- */
2835
- const getParsedStyle = (style) => {
2836
- if (style) {
2837
- const styleKeys = Object.keys(themeTypesKeys);
2838
- const parsed = styleKeys.map((sk) => {
2839
- const themeItem = themeTypesKeys[sk];
2840
- let userValue = style[sk];
2841
- return {
2842
- [themeItem.cssVariable]: userValue,
2843
- };
2844
- });
2845
- // adds a variant with 0.05 opacity for each color
2846
- // will result in variables like this:
2847
- // var(--squid-theme-grey-100-005) --> grey-100 with 0.05 opacity
2848
- // styleKeys.forEach((sk) => {
2849
- // const themeItem = themeTypesKeys[sk]
2850
- // const valueWith005Opacity = getHexColorFromOpacityPercentage(
2851
- // style[sk], // i.e "#ffffff"
2852
- // 0.05,
2853
- // )
2854
- // // { "--squid-theme-grey-100-005": "#ffffff80" }
2855
- // parsed.push({
2856
- // [`${themeItem.cssVariable}-005`]: valueWith005Opacity,
2857
- // })
2858
- // })
2859
- parsed.push({
2860
- [`${themeTypesKeys['grey-100'].cssVariable}-005`]: getHexColorFromOpacityPercentage(style['grey-100'], 0.05),
2861
- });
2862
- return parsed.reduce((a, v) => {
2863
- const key = Object.keys(v)[0];
2864
- return Object.assign(Object.assign({}, a), { [key]: v[key] });
2865
- });
2866
- }
2867
- };
2868
6849
  function getDominantColor(_a) {
2869
6850
  return __awaiter(this, arguments, void 0, function* ({ imageUrl, sampleSize = 1000, }) {
2870
6851
  return new Promise((resolve, reject) => {
@@ -2912,32 +6893,17 @@ function getContrastColor({ r, g, b, }) {
2912
6893
  const brightness = (r * 299 + g * 587 + b * 114) / 1000;
2913
6894
  return brightness >= 128 ? '#000' : '#fff';
2914
6895
  }
2915
- /**
2916
- * Returns a hexadecimal color with opacity based on the given color and opacity percentage.
2917
- *
2918
- * @example getHexColorFromOpacityPercentage('#FF0000', 0.5) // '#FF000080'
2919
- *
2920
- * @param {string} color - The base color in hexadecimal format.
2921
- * @param {number} opacity - The opacity percentage (0-1).
2922
- * @returns {string} The hexadecimal color with opacity.
2923
- */
2924
- function getHexColorFromOpacityPercentage(color, opacity) {
2925
- return (color +
2926
- Math.round(opacity * 255)
2927
- .toString(16)
2928
- .padStart(2, '0')).toUpperCase();
2929
- }
2930
6896
 
2931
6897
  function PlusIcon() {
2932
- return (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M12 17V12M12 12V7M12 12H17M12 12H7", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }) }));
6898
+ return (jsxRuntimeExports.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntimeExports.jsx("path", { d: "M12 17V12M12 12V7M12 12H17M12 12H7", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }) }));
2933
6899
  }
2934
6900
 
2935
6901
  const DEFAULT_RGB = [158, 121, 210];
2936
6902
  const imageClass = 'tw-w-10 tw-aspect-square tw-ml-2 tw-mr-2 -tw-translate-x-2 tw-flex tw-items-center tw-justify-center';
2937
6903
  function Dropdown({ chainImageUrl, tokenImageUrl, tokenSymbol, }) {
2938
- const [tokenImageRgb, setTokenImageRgb] = react.useState(DEFAULT_RGB);
2939
- const [chainImageRgb, setChainImageRgb] = react.useState(DEFAULT_RGB);
2940
- react.useEffect(() => {
6904
+ const [tokenImageRgb, setTokenImageRgb] = reactExports.useState(DEFAULT_RGB);
6905
+ const [chainImageRgb, setChainImageRgb] = reactExports.useState(DEFAULT_RGB);
6906
+ reactExports.useEffect(() => {
2941
6907
  if (tokenImageUrl) {
2942
6908
  // get dominant color when image is loaded
2943
6909
  getDominantColor({ imageUrl: tokenImageUrl })
@@ -2960,7 +6926,7 @@ function Dropdown({ chainImageUrl, tokenImageUrl, tokenSymbol, }) {
2960
6926
  });
2961
6927
  }
2962
6928
  }, []);
2963
- const dropdownGradient = react.useMemo(() => {
6929
+ const dropdownGradient = reactExports.useMemo(() => {
2964
6930
  const defaultRgb = DEFAULT_RGB.join(',');
2965
6931
  // if no chain icon, gradient is as follows:
2966
6932
  // 0%-100% default color
@@ -2978,235 +6944,39 @@ function Dropdown({ chainImageUrl, tokenImageUrl, tokenSymbol, }) {
2978
6944
  // 0%-20% chain color, 20%-100% token color
2979
6945
  return `linear-gradient(to right, rgb(${chainRgb}) 20%, rgb(${tokenRgb}) 25%)`;
2980
6946
  }, [chainImageUrl, tokenImageUrl, tokenImageRgb, chainImageRgb]);
2981
- return (jsxRuntime.jsxs("div", { className: "dropdown-mask tw-flex tw-h-10 tw-w-[209px] tw-items-center tw-text-grey-100", style: {
6947
+ return (jsxRuntimeExports.jsxs("div", { className: "dropdown-mask tw-flex tw-h-10 tw-w-[209px] tw-items-center tw-text-grey-100", style: {
2982
6948
  backgroundImage: dropdownGradient,
2983
- }, children: [jsxRuntime.jsx("div", { className: clsx(imageClass), children: chainImageUrl ? jsxRuntime.jsx("img", { src: chainImageUrl, alt: "" }) : jsxRuntime.jsx(PlusIcon, {}) }), tokenImageUrl && chainImageUrl ? (jsxRuntime.jsx("div", { className: clsx(imageClass), children: jsxRuntime.jsx("img", { src: tokenImageUrl, alt: "" }) })) : null, tokenImageUrl && chainImageUrl ? (jsxRuntime.jsx(TokenSymbol, { rgb: tokenImageRgb, symbol: tokenSymbol || '' })) : (jsxRuntime.jsx(SelectTokenLabel, {}))] }));
6949
+ }, children: [jsxRuntimeExports.jsx("div", { className: clsx(imageClass), children: chainImageUrl ? jsxRuntimeExports.jsx("img", { src: chainImageUrl, alt: "" }) : jsxRuntimeExports.jsx(PlusIcon, {}) }), tokenImageUrl && chainImageUrl ? (jsxRuntimeExports.jsx("div", { className: clsx(imageClass), children: jsxRuntimeExports.jsx("img", { src: tokenImageUrl, alt: "" }) })) : null, tokenImageUrl && chainImageUrl ? (jsxRuntimeExports.jsx(TokenSymbol, { rgb: tokenImageRgb, symbol: tokenSymbol || '' })) : (jsxRuntimeExports.jsx(SelectTokenLabel, {}))] }));
2984
6950
  }
2985
6951
  const TokenSymbol = ({ rgb, symbol, }) => {
2986
- return (jsxRuntime.jsxs("div", { className: "tw-mx-auto tw-flex tw-items-center tw-justify-center tw-gap-1.5", style: {
6952
+ return (jsxRuntimeExports.jsxs("div", { className: "tw-mx-auto tw-flex tw-items-center tw-justify-center tw-gap-1.5", style: {
2987
6953
  color: getContrastColor({
2988
6954
  r: Number(rgb[0]),
2989
6955
  g: Number(rgb[1]),
2990
6956
  b: Number(rgb[2]),
2991
6957
  }),
2992
- }, children: [jsxRuntime.jsx(BodyText, { size: "small", children: symbol }), jsxRuntime.jsx(ChevronArrowIcon, {})] }));
6958
+ }, children: [jsxRuntimeExports.jsx(BodyText, { size: "small", children: symbol }), jsxRuntimeExports.jsx(ChevronArrowIcon, {})] }));
2993
6959
  };
2994
6960
  const SelectTokenLabel = () => {
2995
- return (jsxRuntime.jsxs("div", { className: "tw-mx-auto tw-flex tw-items-center tw-justify-center tw-gap-1.5", children: [jsxRuntime.jsx(BodyText, { size: "small", children: "Select token" }), jsxRuntime.jsx(ChevronArrowIcon, {})] }));
6961
+ return (jsxRuntimeExports.jsxs("div", { className: "tw-mx-auto tw-flex tw-items-center tw-justify-center tw-gap-1.5", children: [jsxRuntimeExports.jsx(BodyText, { size: "small", children: "Select token" }), jsxRuntimeExports.jsx(ChevronArrowIcon, {})] }));
2996
6962
  };
2997
6963
 
2998
- function EthereumIcon() {
2999
- return (jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("path", { d: "M9.99866 2.91669L9.99866 12.6994L14.471 10.1298L9.99866 2.91669Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99872 2.91669L5.52637 10.1298L9.99872 12.6995V8.15387V2.91669Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99866 13.5226V17.0802L14.4737 10.9542L9.99866 13.5226Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99872 17.0801V13.5225L5.52637 10.9542L9.99872 17.0801Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99866 12.6994L14.4709 10.1298L9.99866 8.15387V12.6994Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M5.52637 10.1298L9.99865 12.6994V8.15387L5.52637 10.1298Z", fill: "currentColor" })] }));
3000
- }
3001
-
3002
- function FeeButton() {
3003
- return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xs tw-px-squid-xs", children: [jsxRuntime.jsx(Chip, { label: "Fee" }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(EthereumIcon, {}) }), jsxRuntime.jsx(UsdAmount, { usdAmount: 560 })] })] }));
3004
- }
3005
-
3006
- function SearchIcon() {
3007
- return (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M20 20L16.05 16.05M18 11C18 14.866 14.866 18 11 18C7.13401 18 4 14.866 4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
3008
- }
3009
-
3010
- function Input(_a) {
3011
- var { placeholder = 'Search', showIcon = true, showPasteButton = false, className, icon } = _a, props = __rest(_a, ["placeholder", "showIcon", "showPasteButton", "className", "icon"]);
3012
- return (jsxRuntime.jsxs("div", { className: "tw-relative tw-w-full tw-text-grey-600", children: [jsxRuntime.jsx("input", Object.assign({}, props, { className: cn('tw-relative tw-h-10 tw-w-full tw-rounded-full tw-border tw-border-material-light-thin tw-bg-grey-900 tw-text-body-small tw-font-medium tw-text-grey-300 tw-outline-none tw-outline-offset-0 placeholder:tw-text-grey-600 focus:tw-outline-2 focus:tw-outline-royal-500', showIcon ? 'tw-pl-[44px]' : 'tw-px-2.5', showPasteButton ? 'tw-px-[70px]' : 'tw-pr-2.5', className), placeholder: placeholder })), showIcon ? (jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-y-0 tw-left-0 tw-flex tw-h-full tw-w-[44px] tw-items-center tw-justify-center tw-px-squid-xs", children: icon || jsxRuntime.jsx(SearchIcon, {}) })) : null, showPasteButton ? (jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-y-0 tw-right-1.5 tw-flex tw-items-center tw-justify-center", children: jsxRuntime.jsx(PasteButton, {}) })) : null] }));
3013
- }
3014
- const PasteButton = () => {
3015
- return (jsxRuntime.jsx("button", { className: "tw-h-[30px] tw-rounded-full tw-border tw-border-grey-700 tw-bg-grey-800 tw-px-2 tw-text-grey-300", children: jsxRuntime.jsx(CaptionText, { children: "Paste" }) }));
3016
- };
3017
-
3018
- const switchSizeClassMap = {
3019
- small: 'tw-w-[36px] tw-h-squid-m tw-p-0.5',
3020
- large: 'tw-w-[54px] tw-h-squid-l tw-p-[3px]',
3021
- };
3022
- const switchCircleSizeClassMap = {
3023
- small: 'tw-w-4 tw-h-4',
3024
- large: 'tw-w-6 tw-h-6',
3025
- };
3026
- function Switch({ checked, onChange, size }) {
3027
- return (
3028
- // Switch container
3029
- jsxRuntime.jsxs("label", { className: clsx('tw-relative tw-inline-flex tw-items-center tw-justify-end tw-overflow-hidden tw-rounded-squid-m tw-border tw-border-material-light-thin',
3030
- // size styles
3031
- switchSizeClassMap[size],
3032
- // checked styles
3033
- checked ? 'tw-bg-status-positive' : 'tw-bg-grey-800'), children: [jsxRuntime.jsx("input", { checked: checked, onChange: (e) => onChange(e.target.checked), type: "checkbox", className: "tw-peer tw-sr-only" }), jsxRuntime.jsx("span", { style: {
3034
- filter: 'drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))',
3035
- }, className: clsx('tw-absolute tw-rounded-full tw-border tw-border-material-light-thin',
3036
- // size styles
3037
- switchCircleSizeClassMap[size],
3038
- // disabled and checked styles
3039
- checked
3040
- ? 'tw-right-0.5 tw-bg-grey-100'
3041
- : 'tw-left-0.5 tw-bg-grey-500') })] }));
3042
- }
3043
-
3044
- function Menu(_a) {
3045
- var { children, menuClassName, contentClassName } = _a, props = __rest(_a, ["children", "menuClassName", "contentClassName"]);
3046
- return (jsxRuntime.jsx("div", Object.assign({}, props, { className: menuClassName, children: jsxRuntime.jsx("div", { style: {
3047
- boxShadow: '0px 2px 5px 1px rgba(0, 0, 0, 0.20), 0px 5px 20px -1px rgba(0, 0, 0, 0.33)',
3048
- backdropFilter: 'blur(calc(20px / 2))',
3049
- }, className: cn('tw-w-full tw-max-w-[320px] tw-items-center tw-justify-center tw-rounded-squid-m tw-border tw-border-material-light-thin tw-bg-material-dark-thick tw-p-squid-s tw-text-center tw-text-material-light-thick', contentClassName), children: typeof children === 'string' ? (jsxRuntime.jsx(CaptionText, { children: children })) : (children) }) })));
3050
- }
3051
-
3052
- const tooltipWidthClassMap = {
3053
- max: 'tw-w-max',
3054
- container: 'tw-w-full',
3055
- };
3056
- const tooltipThresholdClassMap = {
3057
- xxs: 'tw-pb-squid-xxs',
3058
- xs: 'tw-pb-squid-xs',
3059
- s: 'tw-pb-squid-s',
3060
- m: 'tw-pb-squid-m',
3061
- l: 'tw-pb-squid-l',
3062
- xl: 'tw-pb-squid-xl',
3063
- xxl: 'tw-pb-squid-xxl',
3064
- };
3065
- function Tooltip({ children, tooltipContent, tooltipWidth = 'container', threshold = 'xxs', className, }) {
3066
- return (jsxRuntime.jsxs("div", { className: cn('tw-relative', className), children: [jsxRuntime.jsx("div", { className: "tw-peer", children: children }), jsxRuntime.jsx(Menu, { menuClassName: cn('tw-absolute peer-hover:tw-block hover:tw-block tw-hidden tw-z-40', 'tw-left-1/2 -tw-translate-x-1/2 tw-bottom-full', tooltipWidthClassMap[tooltipWidth], tooltipThresholdClassMap[threshold]), children: tooltipContent })] }));
3067
- }
3068
-
3069
- function Boost() {
3070
- return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xxs", children: [jsxRuntime.jsx(BoostButton, {}), jsxRuntime.jsx(Chip, { label: "20s", className: "tw-bg-status-positive tw-text-grey-900" })] }));
3071
- }
3072
-
3073
- var DetailsToolbarState;
3074
- (function (DetailsToolbarState) {
3075
- DetailsToolbarState[DetailsToolbarState["FULL"] = 0] = "FULL";
3076
- DetailsToolbarState[DetailsToolbarState["LOADING"] = 1] = "LOADING";
3077
- DetailsToolbarState[DetailsToolbarState["EMPTY"] = 2] = "EMPTY";
3078
- DetailsToolbarState[DetailsToolbarState["ERROR"] = 3] = "ERROR";
3079
- })(DetailsToolbarState || (DetailsToolbarState = {}));
3080
-
3081
- function EmojiSadIcon() {
3082
- return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM13.5341 12.4645C11.5815 10.5118 8.41568 10.5118 6.46306 12.4645C6.07254 12.855 6.07254 13.4882 6.46306 13.8787C6.85358 14.2692 7.48675 14.2692 7.87727 13.8787C9.04885 12.7071 10.9483 12.7071 12.1199 13.8787C12.5104 14.2692 13.1436 14.2692 13.5341 13.8787C13.9247 13.4882 13.9247 12.855 13.5341 12.4645ZM8.5 7.5C8.5 8.32843 7.94036 9 7.25 9C6.55964 9 6 8.32843 6 7.5C6 6.67157 6.55964 6 7.25 6C7.94036 6 8.5 6.67157 8.5 7.5ZM12.75 9C13.4404 9 14 8.32843 14 7.5C14 6.67157 13.4404 6 12.75 6C12.0596 6 11.5 6.67157 11.5 7.5C11.5 8.32843 12.0596 9 12.75 9Z", fill: "currentColor" }) }));
3083
- }
3084
-
3085
- const detailStateClassMap = {
3086
- [DetailsToolbarState.LOADING]: 'tw-opacity-33 tw-pointer-events-none',
3087
- [DetailsToolbarState.EMPTY]: 'tw-pointer-events-none tw-hidden',
3088
- [DetailsToolbarState.ERROR]: 'tw-opacity-33 tw-pointer-events-none',
3089
- [DetailsToolbarState.FULL]: '',
3090
- };
3091
- function DetailsToolbar({ state = DetailsToolbarState.FULL, errorMessage, }) {
3092
- const detailClassName = cn('tw-w-[190px]', detailStateClassMap[state]);
3093
- return (jsxRuntime.jsx("aside", { className: "tw-h-squid-[50px] tw-flex tw-w-[480px] tw-items-center tw-justify-around tw-bg-grey-900 tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: state === DetailsToolbarState.ERROR ? (jsxRuntime.jsx(ErrorMessage, { message: errorMessage })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(FeeButton, {}) }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xl tw-w-squid-xxl tw-items-center tw-justify-center", children: state === DetailsToolbarState.LOADING ? (jsxRuntime.jsx(Loader, { size: "32" })) : (jsxRuntime.jsx(Button, { variant: "tertiary", size: "md", className: "tw-border-transparent tw-bg-transparent", icon: jsxRuntime.jsx(ChevronLargeDownIcon, {}) })) }), jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(Boost, {}) })] })) }));
3094
- }
3095
- const ErrorMessage = ({ message }) => {
3096
- return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-flex-1 tw-items-center tw-gap-squid-xxs tw-text-status-negative", children: [jsxRuntime.jsx(EmojiSadIcon, {}), jsxRuntime.jsx(CaptionText, { children: message })] }));
3097
- };
3098
-
3099
- function Modal({ children }) {
3100
- return (
3101
- // modal container
3102
- jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-0 tw-flex tw-items-start tw-justify-center tw-bg-material-dark-thick tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", style: {
3103
- backdropFilter: 'blur(20px)',
3104
- }, children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-[600px] tw-w-[400px] tw-flex-col tw-items-start tw-gap-squid-xxs tw-self-end tw-overflow-hidden", children: children }) }));
3105
- }
3106
-
3107
- // font size, line height, and letter spacing classes
3108
- const textClassMap = {
3109
- small: 'tw-text-heading-small tw-tracking-heading-small tw-leading-heading-small',
3110
- medium: 'tw-text-heading-medium tw-tracking-heading-medium tw-leading-heading-medium',
3111
- large: 'tw-text-heading-large tw-tracking-heading-large tw-leading-heading-large',
3112
- };
3113
- function HeadingText({ children, bold, size }) {
3114
- const fontWeightClass = bold
3115
- ? 'tw-font-heading-bold'
3116
- : 'tw-font-heading-regular';
3117
- return (jsxRuntime.jsx("h6", { className: clsx(textClassMap[size], fontWeightClass), children: children }));
3118
- }
3119
-
3120
- function NavigationBar({ title, displayBackButton = false, logoUrl, }) {
3121
- return (jsxRuntime.jsxs("nav", { className: cn('tw-flex tw-max-h-[120px] tw-min-w-96 tw-flex-col tw-bg-grey-900 tw-text-grey-300'), children: [jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs', displayBackButton ? 'tw-px-squid-m' : 'tw-pl-squid-l tw-pr-squid-m'), children: [displayBackButton ? (jsxRuntime.jsx(Button, { variant: "tertiary", size: "md", icon: jsxRuntime.jsx(ArrowLeftIcon, {}) })) : null, logoUrl ? (jsxRuntime.jsx("img", { src: logoUrl, className: "tw-h-squid-xl tw-min-w-squid-xl" })) : null, jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: jsxRuntime.jsx(AddressButton, { label: "Connect" }) })] }), title ? (jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xxl tw-items-center tw-px-squid-l tw-py-squid-xxs", children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] }));
3122
- }
3123
-
3124
- function ProductCard({ children }) {
3125
- return (jsxRuntime.jsx("div", { className: "tw-h-card tw-min-h-card tw-w-card tw-rounded-squid-xl tw-border-[1px] tw-border-solid tw-border-material-light-thick tw-bg-material-light-thick tw-p-squid-xs tw-backdrop-blur-[calc(1.25rem/2)]", children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-full tw-max-h-[660px] tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-squid-l tw-bg-grey-900 tw-text-grey-300", children: children }) }));
3126
- }
3127
-
3128
- function MaxIcon() {
3129
- return (jsxRuntime.jsxs("svg", { width: "20", height: "21", viewBox: "0 0 20 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_41_20801)", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20 10.5C20 16.0228 15.5228 20.5 10 20.5C4.47715 20.5 0 16.0228 0 10.5C0 4.97715 4.47715 0.5 10 0.5C15.5228 0.5 20 4.97715 20 10.5ZM10.6508 4.74074L14.1508 7.74074C14.5701 8.10017 14.6187 8.73147 14.2593 9.15079C13.8998 9.57012 13.2685 9.61868 12.8492 9.25926L10 6.81708L7.15079 9.25926C6.73147 9.61868 6.10017 9.57012 5.74074 9.15079C5.38132 8.73147 5.42988 8.10017 5.84921 7.74074L9.34921 4.74074C9.7237 4.41975 10.2763 4.41975 10.6508 4.74074ZM14.1508 13.7407L10.6508 10.7407C10.2763 10.4198 9.7237 10.4198 9.34921 10.7407L5.84921 13.7407C5.42988 14.1002 5.38132 14.7315 5.74074 15.1508C6.10017 15.5701 6.73147 15.6187 7.15079 15.2593L10 12.8171L12.8492 15.2593C13.2685 15.6187 13.8998 15.5701 14.2593 15.1508C14.6187 14.7315 14.5701 14.1002 14.1508 13.7407Z", fill: "currentColor" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_41_20801", children: jsxRuntime.jsx("rect", { width: "20", height: "20", fill: "white", transform: "translate(0 0.5)" }) }) })] }));
3130
- }
3131
-
3132
- function SwapInputsIcon() {
3133
- return (jsxRuntime.jsxs("svg", { width: "20", height: "21", viewBox: "0 0 20 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_40_7936)", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20 10.5C20 16.0228 15.5228 20.5 10 20.5C4.47715 20.5 0 16.0228 0 10.5C0 4.97715 4.47715 0.5 10 0.5C15.5228 0.5 20 4.97715 20 10.5ZM8.38268 4.57612C8.75636 4.7309 9 5.09554 9 5.5V15.5C9 16.0523 8.55228 16.5 8 16.5C7.44772 16.5 7 16.0523 7 15.5V7.91421L5.70711 9.20711C5.31658 9.59763 4.68342 9.59763 4.29289 9.20711C3.90237 8.81658 3.90237 8.18342 4.29289 7.79289L7.29289 4.79289C7.57889 4.5069 8.00901 4.42134 8.38268 4.57612ZM11 15.5C11 15.9045 11.2436 16.2691 11.6173 16.4239C11.991 16.5787 12.4211 16.4931 12.7071 16.2071L15.7071 13.2071C16.0976 12.8166 16.0976 12.1834 15.7071 11.7929C15.3166 11.4024 14.6834 11.4024 14.2929 11.7929L13 13.0858V5.5C13 4.94771 12.5523 4.5 12 4.5C11.4477 4.5 11 4.94771 11 5.5V15.5Z", fill: "currentColor" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_40_7936", children: jsxRuntime.jsx("rect", { width: "20", height: "20", fill: "white", transform: "translate(0 0.5)" }) }) })] }));
3134
- }
3135
-
3136
- function WalletAddress({ address, ens }) {
3137
- return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", children: ens ? ens : (address === null || address === void 0 ? void 0 : address.slice(0, 6)) + '...' + (address === null || address === void 0 ? void 0 : address.slice(-4)) }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronArrowIcon, {}) })] }));
3138
- }
3139
-
3140
- function SwapConfiguration({ priceImpactPercentage, amount = 0, swapAmountUsd = 0, balance = '0', isFetching = false, chain, token, direction, }) {
3141
- const priceImpactClass = (priceImpactPercentage !== null && priceImpactPercentage !== void 0 ? priceImpactPercentage : 0) > 5
3142
- ? 'tw-text-status-negative'
3143
- : 'tw-text-grey-300';
3144
- return (jsxRuntime.jsxs("section", { className: "tw-h-[205px] tw-max-h-[205px] tw-bg-grey-900 tw-px-squid-l tw-pb-squid-m", children: [jsxRuntime.jsxs("header", { className: "tw-flex tw-items-center tw-gap-1 tw-py-squid-s tw-leading-5 tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === 'from' ? 'Pay' : 'Receive' }), jsxRuntime.jsx(BodyText, { className: "tw-text-grey-600", size: "small", children: ":" }), jsxRuntime.jsx(WalletAddress, { ens: "so-so.eth" })] }), jsxRuntime.jsx(Dropdown, { chainImageUrl: chain === null || chain === void 0 ? void 0 : chain.iconUrl, tokenImageUrl: token === null || token === void 0 ? void 0 : token.iconUrl, tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol }), jsxRuntime.jsx("input", { className: "tw-h-[75px] tw-w-full tw-bg-transparent tw-py-squid-m tw-text-heading-small tw-font-heading-regular tw-text-royal-400 placeholder:tw-text-grey-600 focus:tw-outline-none", placeholder: "0", value: amount }), !(token === null || token === void 0 ? void 0 : token.iconUrl) || isFetching ? null : (jsxRuntime.jsxs("footer", { className: "tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1.5", children: [jsxRuntime.jsx(SwapInputsIcon, {}), jsxRuntime.jsx(UsdAmount, { usdAmount: swapAmountUsd }), priceImpactPercentage ? (jsxRuntime.jsxs("span", { className: clsx('tw-flex tw-items-center', priceImpactClass), children: [jsxRuntime.jsx(ArrowTriangle, {}), jsxRuntime.jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat('%') })] })) : null] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1.5", children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balance }), jsxRuntime.jsx(MaxIcon, {})] })] }))] }));
3145
- }
3146
-
3147
- function DropdownMenuItem({ label, imageUrl, icon, }) {
3148
- return (jsxRuntime.jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs", children: jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-xs tw-pl-squid-xxs", children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-squid-xs", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { children: label })] }) }));
3149
- }
3150
-
3151
- function DotGrid1x3HorizontalIcon() {
3152
- return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.33325 8.00008C1.33325 7.2637 1.93021 6.66675 2.66659 6.66675C3.40297 6.66675 3.99992 7.2637 3.99992 8.00008C3.99992 8.73646 3.40297 9.33341 2.66659 9.33341C1.93021 9.33341 1.33325 8.73646 1.33325 8.00008ZM6.66659 8.00008C6.66659 7.2637 7.26354 6.66675 7.99992 6.66675C8.7363 6.66675 9.33325 7.2637 9.33325 8.00008C9.33325 8.73646 8.7363 9.33341 7.99992 9.33341C7.26354 9.33341 6.66659 8.73646 6.66659 8.00008ZM11.9999 8.00008C11.9999 7.2637 12.5969 6.66675 13.3333 6.66675C14.0696 6.66675 14.6666 7.2637 14.6666 8.00008C14.6666 8.73646 14.0696 9.33341 13.3333 9.33341C12.5969 9.33341 11.9999 8.73646 11.9999 8.00008Z", fill: "currentColor" }) }));
3153
- }
3154
-
3155
- function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, pendingLabel = 'Pending', }) {
3156
- return (jsxRuntime.jsxs("li", { className: "tw-flex tw-h-list-item-large tw-w-list-item-small tw-items-center tw-gap-squid-xs tw-bg-grey-900 tw-px-squid-m tw-py-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [isPending ? (jsxRuntime.jsx("span", { className: "tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-30 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-grey-900 tw-bg-royal-400 tw-p-0.5", children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {}) })) : null, jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-z-20 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-z-10 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-w-[230px] tw-flex-col", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), isPending ? (jsxRuntime.jsx(CaptionText, { className: "tw-text-royal-400", children: pendingLabel })) : (jsxRuntime.jsx(CaptionText, { children: dateCompleted }))] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })] })] })] }));
3157
- }
3158
-
3159
- const listItemSizeMap = {
3160
- small: 'tw-max-w-list-item-small tw-h-list-item-small tw-px-squid-xs tw-mx-squid-xs',
3161
- large: 'tw-max-w-list-item-large tw-h-list-item-large tw-px-squid-xs tw-mx-squid-xs',
3162
- };
3163
- function ListItem({ title, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size = 'large', mainIcon, className, }) {
3164
- return (jsxRuntime.jsxs("li", { className: cn('tw-flex tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-bg-grey-900 tw-py-squid-xxs tw-text-grey-300', listItemSizeMap[size], className), children: [size === 'large' ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, size: "md", rounded: false })) })) : (jsxRuntime.jsx("div", { className: "tw-h-[30px] tw-w-[30px]", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-[40px] tw-w-full tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xs',
3165
- // 'large' variant has extra padding
3166
- size === 'large' && 'tw-px-squid-xxs'), children: [typeof title === 'string' ? (jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px]", children: title })) : (title), size === 'large' && subtitle ? (jsxRuntime.jsx(CaptionText, { className: "tw-h-squid-xs !tw-leading-[10px] tw-text-grey-500", children: subtitle })) : null] }), jsxRuntime.jsxs("span", { className: "tw-flex tw-max-h-4 tw-items-center", children: [size === 'large' ? (jsxRuntime.jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })) : null, jsxRuntime.jsx("span", { className: "min-tw-w-4 min-tw-h-4", children: icon ? icon : null })] })] }));
3167
- }
3168
-
3169
- function MenuItem({ label, imageUrl, icon }) {
3170
- return (jsxRuntime.jsxs("li", { className: "tw-mx-squid-xxs tw-inline-flex tw-max-h-list-item-small tw-items-center tw-justify-start tw-gap-squid-xxs tw-rounded-squid-xs tw-bg-grey-900 tw-py-squid-xxs tw-pl-squid-xxs tw-pr-squid-xl tw-text-grey-300", children: [jsxRuntime.jsx("div", { className: "tw-h-squid-m tw-w-squid-m", children: imageUrl ? (jsxRuntime.jsx("img", { className: "tw-h-full tw-w-full tw-rounded-squid-xxs", src: imageUrl, alt: "" })) : icon ? (icon) : null }), jsxRuntime.jsx(CaptionText, { children: label })] }));
6964
+ function UsdAmount({ usdAmount }) {
6965
+ return (jsxRuntimeExports.jsxs("span", { className: "tw-flex tw-items-center tw-text-grey-500", children: [jsxRuntimeExports.jsx(CaptionText, { className: "tw-text-grey-500/65", children: "$" }), jsxRuntimeExports.jsx(CaptionText, { children: usdAmount.toString() })] }));
3171
6966
  }
3172
6967
 
3173
- function SectionTitle({ title, icon, accessory, actionIcon, className, }) {
3174
- return (jsxRuntime.jsxs("header", { className: cn('tw-flex tw-h-[46px] tw-w-full tw-items-center tw-gap-squid-xxs tw-bg-grey-900 tw-px-squid-m tw-pb-squid-xs tw-pt-squid-m tw-text-royal-400', className), children: [icon, jsxRuntime.jsx(CaptionText, { children: title }), accessory ? (jsxRuntime.jsx(CaptionText, { className: "tw-flex-1 tw-text-right tw-text-grey-500", children: accessory })) : actionIcon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: actionIcon })) : null] }));
6968
+ function EthereumIcon() {
6969
+ return (jsxRuntimeExports.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntimeExports.jsx("path", { d: "M9.99866 2.91669L9.99866 12.6994L14.471 10.1298L9.99866 2.91669Z", fill: "currentColor" }), jsxRuntimeExports.jsx("path", { d: "M9.99872 2.91669L5.52637 10.1298L9.99872 12.6995V8.15387V2.91669Z", fill: "currentColor" }), jsxRuntimeExports.jsx("path", { d: "M9.99866 13.5226V17.0802L14.4737 10.9542L9.99866 13.5226Z", fill: "currentColor" }), jsxRuntimeExports.jsx("path", { d: "M9.99872 17.0801V13.5225L5.52637 10.9542L9.99872 17.0801Z", fill: "currentColor" }), jsxRuntimeExports.jsx("path", { d: "M9.99866 12.6994L14.4709 10.1298L9.99866 8.15387V12.6994Z", fill: "currentColor" }), jsxRuntimeExports.jsx("path", { d: "M5.52637 10.1298L9.99865 12.6994V8.15387L5.52637 10.1298Z", fill: "currentColor" })] }));
3175
6970
  }
3176
6971
 
3177
- const squidConfigContext = react.createContext(undefined);
3178
- function SquidConfigProvider({ theme, children, }) {
3179
- const Provider = squidConfigContext.Provider;
3180
- const parsedStyle = getParsedStyle(theme);
3181
- return (jsxRuntime.jsx(Provider, { value: theme, children: jsxRuntime.jsx("div", { style: parsedStyle, className: clsx('tw-text-base-content tw-relative tw-font-geist'), children: children }) }));
6972
+ function FeeButton() {
6973
+ return (jsxRuntimeExports.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xs tw-px-squid-xs", children: [jsxRuntimeExports.jsx(Chip, { label: "Fee" }), jsxRuntimeExports.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntimeExports.jsx(Chip, { icon: jsxRuntimeExports.jsx(EthereumIcon, {}) }), jsxRuntimeExports.jsx(UsdAmount, { usdAmount: 560 })] })] }));
3182
6974
  }
3183
6975
 
3184
6976
  exports.AddressButton = AddressButton;
3185
6977
  exports.ArrowButton = ArrowButton;
3186
- exports.BadgeImage = BadgeImage;
3187
- exports.BodyText = BodyText;
3188
- exports.Boost = Boost;
3189
6978
  exports.BoostButton = BoostButton;
3190
6979
  exports.Button = Button;
3191
- exports.CaptionText = CaptionText;
3192
6980
  exports.Chip = Chip;
3193
- exports.DetailsToolbar = DetailsToolbar;
3194
6981
  exports.Dropdown = Dropdown;
3195
- exports.DropdownMenuItem = DropdownMenuItem;
3196
6982
  exports.FeeButton = FeeButton;
3197
- exports.HeadingText = HeadingText;
3198
- exports.HistoryItem = HistoryItem;
3199
- exports.Input = Input;
3200
- exports.ListItem = ListItem;
3201
- exports.Menu = Menu;
3202
- exports.MenuItem = MenuItem;
3203
- exports.Modal = Modal;
3204
- exports.NavigationBar = NavigationBar;
3205
- exports.ProductCard = ProductCard;
3206
- exports.SectionTitle = SectionTitle;
3207
- exports.SquidConfigProvider = SquidConfigProvider;
3208
- exports.SwapConfiguration = SwapConfiguration;
3209
- exports.Switch = Switch;
3210
- exports.Tooltip = Tooltip;
3211
- exports.UsdAmount = UsdAmount;
3212
- exports.WalletAddress = WalletAddress;