@pie-lib/text-select 1.29.4 → 1.29.5

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/esm/index.js CHANGED
@@ -16,7 +16,6 @@ import yellow from '@material-ui/core/colors/yellow';
16
16
  import green from '@material-ui/core/colors/green';
17
17
  import debug from 'debug';
18
18
  import require$$3 from '@material-ui/core/SvgIcon';
19
- import { renderToString } from 'react-dom/server';
20
19
  import Translator from '@pie-lib/translator';
21
20
 
22
21
  function _extends() {
@@ -1368,6 +1367,4350 @@ var Token$1 = withStyles(theme => {
1368
1367
  };
1369
1368
  })(Token);
1370
1369
 
1370
+ var server_browser = {exports: {}};
1371
+
1372
+ /*
1373
+ object-assign
1374
+ (c) Sindre Sorhus
1375
+ @license MIT
1376
+ */
1377
+
1378
+ var objectAssign;
1379
+ var hasRequiredObjectAssign;
1380
+
1381
+ function requireObjectAssign () {
1382
+ if (hasRequiredObjectAssign) return objectAssign;
1383
+ hasRequiredObjectAssign = 1;
1384
+ /* eslint-disable no-unused-vars */
1385
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1386
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1387
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1388
+
1389
+ function toObject(val) {
1390
+ if (val === null || val === undefined) {
1391
+ throw new TypeError('Object.assign cannot be called with null or undefined');
1392
+ }
1393
+
1394
+ return Object(val);
1395
+ }
1396
+
1397
+ function shouldUseNative() {
1398
+ try {
1399
+ if (!Object.assign) {
1400
+ return false;
1401
+ }
1402
+
1403
+ // Detect buggy property enumeration order in older V8 versions.
1404
+
1405
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
1406
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
1407
+ test1[5] = 'de';
1408
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
1409
+ return false;
1410
+ }
1411
+
1412
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1413
+ var test2 = {};
1414
+ for (var i = 0; i < 10; i++) {
1415
+ test2['_' + String.fromCharCode(i)] = i;
1416
+ }
1417
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1418
+ return test2[n];
1419
+ });
1420
+ if (order2.join('') !== '0123456789') {
1421
+ return false;
1422
+ }
1423
+
1424
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1425
+ var test3 = {};
1426
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1427
+ test3[letter] = letter;
1428
+ });
1429
+ if (Object.keys(Object.assign({}, test3)).join('') !==
1430
+ 'abcdefghijklmnopqrst') {
1431
+ return false;
1432
+ }
1433
+
1434
+ return true;
1435
+ } catch (err) {
1436
+ // We don't expect any of the above to throw, but better to be safe.
1437
+ return false;
1438
+ }
1439
+ }
1440
+
1441
+ objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
1442
+ var from;
1443
+ var to = toObject(target);
1444
+ var symbols;
1445
+
1446
+ for (var s = 1; s < arguments.length; s++) {
1447
+ from = Object(arguments[s]);
1448
+
1449
+ for (var key in from) {
1450
+ if (hasOwnProperty.call(from, key)) {
1451
+ to[key] = from[key];
1452
+ }
1453
+ }
1454
+
1455
+ if (getOwnPropertySymbols) {
1456
+ symbols = getOwnPropertySymbols(from);
1457
+ for (var i = 0; i < symbols.length; i++) {
1458
+ if (propIsEnumerable.call(from, symbols[i])) {
1459
+ to[symbols[i]] = from[symbols[i]];
1460
+ }
1461
+ }
1462
+ }
1463
+ }
1464
+
1465
+ return to;
1466
+ };
1467
+ return objectAssign;
1468
+ }
1469
+
1470
+ /** @license React v16.14.0
1471
+ * react-dom-server.browser.production.min.js
1472
+ *
1473
+ * Copyright (c) Facebook, Inc. and its affiliates.
1474
+ *
1475
+ * This source code is licensed under the MIT license found in the
1476
+ * LICENSE file in the root directory of this source tree.
1477
+ */
1478
+
1479
+ var reactDomServer_browser_production_min;
1480
+ var hasRequiredReactDomServer_browser_production_min;
1481
+
1482
+ function requireReactDomServer_browser_production_min () {
1483
+ if (hasRequiredReactDomServer_browser_production_min) return reactDomServer_browser_production_min;
1484
+ hasRequiredReactDomServer_browser_production_min = 1;
1485
+ var k=requireObjectAssign(),l=React;function q(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
1486
+ var t="function"===typeof Symbol&&Symbol.for,aa=t?Symbol.for("react.portal"):60106,u=t?Symbol.for("react.fragment"):60107,ba=t?Symbol.for("react.strict_mode"):60108,ca=t?Symbol.for("react.profiler"):60114,v=t?Symbol.for("react.provider"):60109,da=t?Symbol.for("react.context"):60110,ea=t?Symbol.for("react.concurrent_mode"):60111,fa=t?Symbol.for("react.forward_ref"):60112,B=t?Symbol.for("react.suspense"):60113,ha=t?Symbol.for("react.suspense_list"):60120,ia=t?Symbol.for("react.memo"):60115,ja=t?Symbol.for("react.lazy"):
1487
+ 60116,ka=t?Symbol.for("react.block"):60121,la=t?Symbol.for("react.fundamental"):60117,ma=t?Symbol.for("react.scope"):60119;function na(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(c){0===a._status&&(c=c.default,a._status=1,a._result=c);},function(c){0===a._status&&(a._status=2,a._result=c);});}}
1488
+ function C(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case u:return "Fragment";case aa:return "Portal";case ca:return "Profiler";case ba:return "StrictMode";case B:return "Suspense";case ha:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case da:return "Context.Consumer";case v:return "Context.Provider";case fa:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");
1489
+ case ia:return C(a.type);case ka:return C(a.render);case ja:if(a=1===a._status?a._result:null)return C(a)}return null}var D=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;D.hasOwnProperty("ReactCurrentDispatcher")||(D.ReactCurrentDispatcher={current:null});D.hasOwnProperty("ReactCurrentBatchConfig")||(D.ReactCurrentBatchConfig={suspense:null});var oa={};function E(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1;}
1490
+ function pa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return E(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c;}else b=oa;return b}for(var F=new Uint16Array(16),H=0;15>H;H++)F[H]=H+1;F[15]=0;
1491
+ var qa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ra=Object.prototype.hasOwnProperty,sa={},ta={};
1492
+ function ua(a){if(ra.call(ta,a))return true;if(ra.call(sa,a))return false;if(qa.test(a))return ta[a]=true;sa[a]=true;return false}function va(a,b,c,d){if(null!==c&&0===c.type)return false;switch(typeof b){case "function":case "symbol":return true;case "boolean":if(null!==c)return !c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return "data-"!==a&&"aria-"!==a;default:return false}}
1493
+ function wa(a,b,c,d){if(null===b||"undefined"===typeof b||va(a,b,c))return true;if(null!==c)switch(c.type){case 3:return !b;case 4:return false===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return false}function J(a,b,c,d,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;}var K={};
1494
+ "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){K[a]=new J(a,0,false,a,null,false);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];K[b]=new J(b,1,false,a[1],null,false);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){K[a]=new J(a,2,false,a.toLowerCase(),null,false);});
1495
+ ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){K[a]=new J(a,2,false,a,null,false);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){K[a]=new J(a,3,false,a.toLowerCase(),null,false);});
1496
+ ["checked","multiple","muted","selected"].forEach(function(a){K[a]=new J(a,3,true,a,null,false);});["capture","download"].forEach(function(a){K[a]=new J(a,4,false,a,null,false);});["cols","rows","size","span"].forEach(function(a){K[a]=new J(a,6,false,a,null,false);});["rowSpan","start"].forEach(function(a){K[a]=new J(a,5,false,a.toLowerCase(),null,false);});var L=/[\-:]([a-z])/g;function M(a){return a[1].toUpperCase()}
1497
+ "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(L,
1498
+ M);K[b]=new J(b,1,false,a,null,false);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(L,M);K[b]=new J(b,1,false,a,"http://www.w3.org/1999/xlink",false);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(L,M);K[b]=new J(b,1,false,a,"http://www.w3.org/XML/1998/namespace",false);});["tabIndex","crossOrigin"].forEach(function(a){K[a]=new J(a,1,false,a.toLowerCase(),null,false);});
1499
+ K.xlinkHref=new J("xlinkHref",1,false,"xlink:href","http://www.w3.org/1999/xlink",true);["src","href","action","formAction"].forEach(function(a){K[a]=new J(a,1,false,a.toLowerCase(),null,true);});var xa=/["'&<>]/;
1500
+ function N(a){if("boolean"===typeof a||"number"===typeof a)return ""+a;a=""+a;var b=xa.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b;}a=f!==d?c+a.substring(f,d):c;}return a}
1501
+ function ya(a,b){var c=K.hasOwnProperty(a)?K[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?false:true;if(d||wa(a,b,c))return "";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&true===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(N(b)+'"')}return ua(a)?a+'="'+(N(b)+'"'):""}function za(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
1502
+ var Aa="function"===typeof Object.is?Object.is:za,O=null,P=null,Q=null,R=false,S=false,U=null,V=0;function W(){if(null===O)throw Error(q(321));return O}function Ba(){if(0<V)throw Error(q(312));return {memoizedState:null,queue:null,next:null}}function Ca(){null===Q?null===P?(R=false,P=Q=Ba()):(R=true,Q=P):null===Q.next?(R=false,Q=Q.next=Ba()):(R=true,Q=Q.next);return Q}function Da(a,b,c,d){for(;S;)S=false,V+=1,Q=null,c=a(b,d);P=O=null;V=0;Q=U=null;return c}function Ea(a,b){return "function"===typeof b?b(a):b}
1503
+ function Fa(a,b,c){O=W();Q=Ca();if(R){var d=Q.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=Q.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);Q.memoizedState=d;return [d,b]}return [Q.memoizedState,b]}a=a===Ea?"function"===typeof b?b():b:void 0!==c?c(b):b;Q.memoizedState=a;a=Q.queue={last:null,dispatch:null};a=a.dispatch=Ga.bind(null,O,a);return [Q.memoizedState,a]}
1504
+ function Ga(a,b,c){if(!(25>V))throw Error(q(301));if(a===O)if(S=true,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else {for(b=c;null!==b.next;)b=b.next;b.next=a;}}function Ha(){}
1505
+ var X=0,Ia={readContext:function(a){var b=X;E(a,b);return a[b]},useContext:function(a){W();var b=X;E(a,b);return a[b]},useMemo:function(a,b){O=W();Q=Ca();b=void 0===b?null:b;if(null!==Q){var c=Q.memoizedState;if(null!==c&&null!==b){a:{var d=c[1];if(null===d)d=false;else {for(var f=0;f<d.length&&f<b.length;f++)if(!Aa(b[f],d[f])){d=false;break a}d=true;}}if(d)return c[0]}}a=a();Q.memoizedState=[a,b];return a},useReducer:Fa,useRef:function(a){O=W();Q=Ca();var b=Q.memoizedState;return null===b?(a={current:a},Q.memoizedState=
1506
+ a):b},useState:function(a){return Fa(Ea,a)},useLayoutEffect:function(){},useCallback:function(a){return a},useImperativeHandle:Ha,useEffect:Ha,useDebugValue:Ha,useResponder:function(a,b){return {props:b,responder:a}},useDeferredValue:function(a){W();return a},useTransition:function(){W();return [function(a){a();},false]}},Ja={html:"http://www.w3.org/1999/xhtml"};
1507
+ function Ka(a){switch(a){case "svg":return "http://www.w3.org/2000/svg";case "math":return "http://www.w3.org/1998/Math/MathML";default:return "http://www.w3.org/1999/xhtml"}}
1508
+ var La={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},Ma=k({menuitem:true},La),Y={animationIterationCount:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridArea:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,
1509
+ gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true},Na=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Na.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a];});});
1510
+ var Oa=/([A-Z])/g,Pa=/^ms-/,Z=l.Children.toArray,Qa=D.ReactCurrentDispatcher,Ra={listing:true,pre:true,textarea:true},Sa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ta={},Ua={};function Va(a){if(void 0===a||null===a)return a;var b="";l.Children.forEach(a,function(a){null!=a&&(b+=a);});return b}var Wa=Object.prototype.hasOwnProperty,Xa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Ya(a,b){if(void 0===a)throw Error(q(152,C(b)||"Component"));}
1511
+ function Za(a,b,c){function d(d,g){var e=g.prototype&&g.prototype.isReactComponent,f=pa(g,b,c,e),x=[],h=false,m={isMounted:function(){return false},enqueueForceUpdate:function(){if(null===x)return null},enqueueReplaceState:function(a,c){h=true;x=[c];},enqueueSetState:function(a,c){if(null===x)return null;x.push(c);}};if(e){if(e=new g(d.props,f,m),"function"===typeof g.getDerivedStateFromProps){var w=g.getDerivedStateFromProps.call(null,d.props,e.state);null!=w&&(e.state=k({},e.state,w));}}else if(O={},e=g(d.props,
1512
+ f,m),e=Da(g,d.props,e,f),null==e||null==e.render){a=e;Ya(a,g);return}e.props=d.props;e.context=f;e.updater=m;m=e.state;void 0===m&&(e.state=m=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof g.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof g.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),x.length){m=x;var r=
1513
+ h;x=null;h=false;if(r&&1===m.length)e.state=m[0];else {w=r?m[0]:e.state;var y=true;for(r=r?1:0;r<m.length;r++){var p=m[r];p="function"===typeof p?p.call(e,w,d.props,f):p;null!=p&&(y?(y=false,w=k({},w,p)):k(w,p));}e.state=w;}}else x=null;a=e.render();Ya(a,g);if("function"===typeof e.getChildContext&&(d=g.childContextTypes,"object"===typeof d)){var A=e.getChildContext();for(var T in A)if(!(T in d))throw Error(q(108,C(g)||"Unknown",T));}A&&(b=k({},b,A));}for(;l.isValidElement(a);){var f=a,g=f.type;if("function"!==
1514
+ typeof g)break;d(f,g);}return {child:a,context:b}}
1515
+ var $a=function(){function a(a,b){l.isValidElement(a)?a.type!==u?a=[a]:(a=a.props.children,a=l.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:Ja.html,children:a,childIndex:0,context:oa,footer:""};var c=F[0];if(0===c){var g=F;c=g.length;var d=2*c;if(!(65536>=d))throw Error(q(304));var h=new Uint16Array(d);h.set(g);F=h;F[0]=c+1;for(g=c;g<d-1;g++)F[g]=g+1;F[d-1]=0;}else F[0]=F[c];this.threadID=c;this.stack=[a];this.exhausted=false;this.currentSelectValue=null;this.previousWasTextNode=false;this.makeStaticMarkup=
1516
+ b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=true;this.clearProviders();var a=this.threadID;F[a]=F[0];F[0]=a;}};b.pushProvider=function(a){var c=++this.contextIndex,b=a.type._context,g=this.threadID;E(b,g);var x=b[g];this.contextStack[c]=b;this.contextValueStack[c]=x;b[g]=a.props.value;};b.popProvider=function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];
1517
+ this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f;};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a];};b.read=function(a){if(this.exhausted)return null;var b=X;X=this.threadID;var c=Qa.current;Qa.current=Ia;try{for(var g=[""],x=!1;g[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;F[h]=F[0];F[0]=h;break}var e=this.stack[this.stack.length-1];if(x||e.childIndex>=
1518
+ e.children.length){var I=e.footer;""!==I&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===v)this.popProvider(e.type);else if(e.type===B){this.suspenseDepth--;var G=g.pop();if(x){x=!1;var n=e.fallbackFrame;if(!n)throw Error(q(303));this.stack.push(n);g[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else g[this.suspenseDepth]+=G;}g[this.suspenseDepth]+=I;}else {var m=e.children[e.childIndex++],
1519
+ w="";try{w+=this.render(m,e.context,e.domNamespace);}catch(r){if(null!=r&&"function"===typeof r.then)throw Error(q(294));throw r;}finally{}g.length<=this.suspenseDepth&&g.push("");g[this.suspenseDepth]+=w;}}return g[0]}finally{Qa.current=c,X=b;}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return "";if(this.makeStaticMarkup)return N(f);if(this.previousWasTextNode)return "\x3c!-- --\x3e"+N(f);this.previousWasTextNode=true;return N(f)}b=Za(a,b,this.threadID);a=b.child;
1520
+ b=b.context;if(null===a||false===a)return "";if(!l.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===aa)throw Error(q(257));throw Error(q(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return ""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ba:case ea:case ca:case ha:case u:return a=Z(a.props.children),this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
1521
+ "";case B:throw Error(q(294));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case fa:O={};var d=c.render(a.props,a.ref);d=Da(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return "";case ia:return a=[l.createElement(c.type,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case v:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,
1522
+ context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case da:c=a.type;d=a.props;var h=this.threadID;E(c,h);c=Z(d.children(c[h]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return "";case la:throw Error(q(338));case ja:switch(c=a.type,na(c),c._status){case 1:return a=[l.createElement(c._result,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case 2:throw c._result;default:throw Error(q(295));
1523
+ }case ma:throw Error(q(343));}throw Error(q(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();if(!Ta.hasOwnProperty(c)){if(!Sa.test(c))throw Error(q(65,c));Ta[c]=true;}var d=a.props;if("input"===c)d=k({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var h=d.value;if(null==h){h=d.defaultValue;var e=d.children;if(null!=e){if(null!=
1524
+ h)throw Error(q(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(q(93));e=e[0];}h=""+e;}null==h&&(h="");}d=k({},d,{value:void 0,children:""+h});}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=k({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var I=Va(d.children);if(null!=e){var G=null!=d.value?d.value+"":I;h=false;if(Array.isArray(e))for(var n=0;n<e.length;n++){if(""+e[n]===G){h=true;break}}else h=""+e===G;d=k({selected:void 0,children:void 0},
1525
+ d,{selected:h,children:I});}}if(h=d){if(Ma[c]&&(null!=h.children||null!=h.dangerouslySetInnerHTML))throw Error(q(137,c,""));if(null!=h.dangerouslySetInnerHTML){if(null!=h.children)throw Error(q(60));if(!("object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML))throw Error(q(61));}if(null!=h.style&&"object"!==typeof h.style)throw Error(q(62,""));}h=d;e=this.makeStaticMarkup;I=1===this.stack.length;G="<"+a.type;for(z in h)if(Wa.call(h,z)){var m=h[z];if(null!=m){if("style"===
1526
+ z){n=void 0;var w="",r="";for(n in m)if(m.hasOwnProperty(n)){var y=0===n.indexOf("--"),p=m[n];if(null!=p){if(y)var A=n;else if(A=n,Ua.hasOwnProperty(A))A=Ua[A];else {var T=A.replace(Oa,"-$1").toLowerCase().replace(Pa,"-ms-");A=Ua[A]=T;}w+=r+A+":";r=n;y=null==p||"boolean"===typeof p||""===p?"":y||"number"!==typeof p||0===p||Y.hasOwnProperty(r)&&Y[r]?(""+p).trim():p+"px";w+=y;r=";";}}m=w||null;}n=null;b:if(y=c,p=h,-1===y.indexOf("-"))y="string"===typeof p.is;else switch(y){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":y=
1527
+ false;break b;default:y=true;}y?Xa.hasOwnProperty(z)||(n=z,n=ua(n)&&null!=m?n+'="'+(N(m)+'"'):""):n=ya(z,m);n&&(G+=" "+n);}}e||I&&(G+=' data-reactroot=""');var z=G;h="";La.hasOwnProperty(c)?z+="/>":(z+=">",h="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=N(e);break a}e=null;}null!=e?(d=[],Ra.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(z+="\n"),z+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===
1528
+ f?Ka(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:h});this.previousWasTextNode=false;return z};return a}(),ab={renderToString:function(a){a=new $a(a,false);try{return a.read(Infinity)}finally{a.destroy();}},renderToStaticMarkup:function(a){a=new $a(a,true);try{return a.read(Infinity)}finally{a.destroy();}},renderToNodeStream:function(){throw Error(q(207));},renderToStaticNodeStream:function(){throw Error(q(208));
1529
+ },version:"16.14.0"};reactDomServer_browser_production_min=ab.default||ab;
1530
+ return reactDomServer_browser_production_min;
1531
+ }
1532
+
1533
+ var reactDomServer_browser_development = {exports: {}};
1534
+
1535
+ /**
1536
+ * Copyright (c) 2013-present, Facebook, Inc.
1537
+ *
1538
+ * This source code is licensed under the MIT license found in the
1539
+ * LICENSE file in the root directory of this source tree.
1540
+ */
1541
+
1542
+ var ReactPropTypesSecret_1;
1543
+ var hasRequiredReactPropTypesSecret;
1544
+
1545
+ function requireReactPropTypesSecret () {
1546
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
1547
+ hasRequiredReactPropTypesSecret = 1;
1548
+
1549
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1550
+
1551
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
1552
+ return ReactPropTypesSecret_1;
1553
+ }
1554
+
1555
+ var has;
1556
+ var hasRequiredHas;
1557
+
1558
+ function requireHas () {
1559
+ if (hasRequiredHas) return has;
1560
+ hasRequiredHas = 1;
1561
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
1562
+ return has;
1563
+ }
1564
+
1565
+ /**
1566
+ * Copyright (c) 2013-present, Facebook, Inc.
1567
+ *
1568
+ * This source code is licensed under the MIT license found in the
1569
+ * LICENSE file in the root directory of this source tree.
1570
+ */
1571
+
1572
+ var checkPropTypes_1;
1573
+ var hasRequiredCheckPropTypes;
1574
+
1575
+ function requireCheckPropTypes () {
1576
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
1577
+ hasRequiredCheckPropTypes = 1;
1578
+
1579
+ var printWarning = function() {};
1580
+
1581
+ if (process.env.NODE_ENV !== 'production') {
1582
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
1583
+ var loggedTypeFailures = {};
1584
+ var has = /*@__PURE__*/ requireHas();
1585
+
1586
+ printWarning = function(text) {
1587
+ var message = 'Warning: ' + text;
1588
+ if (typeof console !== 'undefined') {
1589
+ console.error(message);
1590
+ }
1591
+ try {
1592
+ // --- Welcome to debugging React ---
1593
+ // This error was thrown as a convenience so that you can use this stack
1594
+ // to find the callsite that caused this warning to fire.
1595
+ throw new Error(message);
1596
+ } catch (x) { /**/ }
1597
+ };
1598
+ }
1599
+
1600
+ /**
1601
+ * Assert that the values match with the type specs.
1602
+ * Error messages are memorized and will only be shown once.
1603
+ *
1604
+ * @param {object} typeSpecs Map of name to a ReactPropType
1605
+ * @param {object} values Runtime values that need to be type-checked
1606
+ * @param {string} location e.g. "prop", "context", "child context"
1607
+ * @param {string} componentName Name of the component for error messages.
1608
+ * @param {?Function} getStack Returns the component stack.
1609
+ * @private
1610
+ */
1611
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1612
+ if (process.env.NODE_ENV !== 'production') {
1613
+ for (var typeSpecName in typeSpecs) {
1614
+ if (has(typeSpecs, typeSpecName)) {
1615
+ var error;
1616
+ // Prop type validation may throw. In case they do, we don't want to
1617
+ // fail the render phase where it didn't fail before. So we log it.
1618
+ // After these have been cleaned up, we'll let them throw.
1619
+ try {
1620
+ // This is intentionally an invariant that gets caught. It's the same
1621
+ // behavior as without this statement except with a better message.
1622
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
1623
+ var err = Error(
1624
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
1625
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
1626
+ 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
1627
+ );
1628
+ err.name = 'Invariant Violation';
1629
+ throw err;
1630
+ }
1631
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1632
+ } catch (ex) {
1633
+ error = ex;
1634
+ }
1635
+ if (error && !(error instanceof Error)) {
1636
+ printWarning(
1637
+ (componentName || 'React class') + ': type specification of ' +
1638
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1639
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1640
+ 'You may have forgotten to pass an argument to the type checker ' +
1641
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1642
+ 'shape all require an argument).'
1643
+ );
1644
+ }
1645
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1646
+ // Only monitor this failure once because there tends to be a lot of the
1647
+ // same error.
1648
+ loggedTypeFailures[error.message] = true;
1649
+
1650
+ var stack = getStack ? getStack() : '';
1651
+
1652
+ printWarning(
1653
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1654
+ );
1655
+ }
1656
+ }
1657
+ }
1658
+ }
1659
+ }
1660
+
1661
+ /**
1662
+ * Resets warning cache when testing.
1663
+ *
1664
+ * @private
1665
+ */
1666
+ checkPropTypes.resetWarningCache = function() {
1667
+ if (process.env.NODE_ENV !== 'production') {
1668
+ loggedTypeFailures = {};
1669
+ }
1670
+ };
1671
+
1672
+ checkPropTypes_1 = checkPropTypes;
1673
+ return checkPropTypes_1;
1674
+ }
1675
+
1676
+ /** @license React v16.14.0
1677
+ * react-dom-server.browser.development.js
1678
+ *
1679
+ * Copyright (c) Facebook, Inc. and its affiliates.
1680
+ *
1681
+ * This source code is licensed under the MIT license found in the
1682
+ * LICENSE file in the root directory of this source tree.
1683
+ */
1684
+
1685
+ var hasRequiredReactDomServer_browser_development;
1686
+
1687
+ function requireReactDomServer_browser_development () {
1688
+ if (hasRequiredReactDomServer_browser_development) return reactDomServer_browser_development.exports;
1689
+ hasRequiredReactDomServer_browser_development = 1;
1690
+
1691
+
1692
+
1693
+ if (process.env.NODE_ENV !== "production") {
1694
+ (function() {
1695
+
1696
+ var React$1 = React;
1697
+ var _assign = requireObjectAssign();
1698
+ var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes();
1699
+
1700
+ // Do not require this module directly! Use normal `invariant` calls with
1701
+ // template literal strings. The messages will be replaced with error codes
1702
+ // during build.
1703
+ function formatProdErrorMessage(code) {
1704
+ var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
1705
+
1706
+ for (var i = 1; i < arguments.length; i++) {
1707
+ url += '&args[]=' + encodeURIComponent(arguments[i]);
1708
+ }
1709
+
1710
+ return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
1711
+ }
1712
+
1713
+ var ReactVersion = '16.14.0';
1714
+
1715
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
1716
+ // Current owner and dispatcher used to share the same ref,
1717
+ // but PR #14548 split them out to better support the react-debug-tools package.
1718
+
1719
+ if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
1720
+ ReactSharedInternals.ReactCurrentDispatcher = {
1721
+ current: null
1722
+ };
1723
+ }
1724
+
1725
+ if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
1726
+ ReactSharedInternals.ReactCurrentBatchConfig = {
1727
+ suspense: null
1728
+ };
1729
+ }
1730
+
1731
+ // by calls to these methods by a Babel plugin.
1732
+ //
1733
+ // In PROD (or in packages without access to React internals),
1734
+ // they are left as they are instead.
1735
+
1736
+ function warn(format) {
1737
+ {
1738
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1739
+ args[_key - 1] = arguments[_key];
1740
+ }
1741
+
1742
+ printWarning('warn', format, args);
1743
+ }
1744
+ }
1745
+ function error(format) {
1746
+ {
1747
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1748
+ args[_key2 - 1] = arguments[_key2];
1749
+ }
1750
+
1751
+ printWarning('error', format, args);
1752
+ }
1753
+ }
1754
+
1755
+ function printWarning(level, format, args) {
1756
+ // When changing this logic, you might want to also
1757
+ // update consoleWithStackDev.www.js as well.
1758
+ {
1759
+ var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
1760
+
1761
+ if (!hasExistingStack) {
1762
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1763
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
1764
+
1765
+ if (stack !== '') {
1766
+ format += '%s';
1767
+ args = args.concat([stack]);
1768
+ }
1769
+ }
1770
+
1771
+ var argsWithFormat = args.map(function (item) {
1772
+ return '' + item;
1773
+ }); // Careful: RN currently depends on this prefix
1774
+
1775
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
1776
+ // breaks IE9: https://github.com/facebook/react/issues/13610
1777
+ // eslint-disable-next-line react-internal/no-production-logging
1778
+
1779
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
1780
+
1781
+ try {
1782
+ // --- Welcome to debugging React ---
1783
+ // This error was thrown as a convenience so that you can use this stack
1784
+ // to find the callsite that caused this warning to fire.
1785
+ var argIndex = 0;
1786
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
1787
+ return args[argIndex++];
1788
+ });
1789
+ throw new Error(message);
1790
+ } catch (x) {}
1791
+ }
1792
+ }
1793
+
1794
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1795
+ // nor polyfill, then a plain number is used for performance.
1796
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1797
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1798
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1799
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1800
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1801
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1802
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1803
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1804
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1805
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1806
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1807
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1808
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1809
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1810
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1811
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1812
+
1813
+ var Uninitialized = -1;
1814
+ var Pending = 0;
1815
+ var Resolved = 1;
1816
+ var Rejected = 2;
1817
+ function refineResolvedLazyComponent(lazyComponent) {
1818
+ return lazyComponent._status === Resolved ? lazyComponent._result : null;
1819
+ }
1820
+ function initializeLazyComponentType(lazyComponent) {
1821
+ if (lazyComponent._status === Uninitialized) {
1822
+ lazyComponent._status = Pending;
1823
+ var ctor = lazyComponent._ctor;
1824
+ var thenable = ctor();
1825
+ lazyComponent._result = thenable;
1826
+ thenable.then(function (moduleObject) {
1827
+ if (lazyComponent._status === Pending) {
1828
+ var defaultExport = moduleObject.default;
1829
+
1830
+ {
1831
+ if (defaultExport === undefined) {
1832
+ error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
1833
+ }
1834
+ }
1835
+
1836
+ lazyComponent._status = Resolved;
1837
+ lazyComponent._result = defaultExport;
1838
+ }
1839
+ }, function (error) {
1840
+ if (lazyComponent._status === Pending) {
1841
+ lazyComponent._status = Rejected;
1842
+ lazyComponent._result = error;
1843
+ }
1844
+ });
1845
+ }
1846
+ }
1847
+
1848
+ function getWrappedName(outerType, innerType, wrapperName) {
1849
+ var functionName = innerType.displayName || innerType.name || '';
1850
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
1851
+ }
1852
+
1853
+ function getComponentName(type) {
1854
+ if (type == null) {
1855
+ // Host root, text node or just invalid type.
1856
+ return null;
1857
+ }
1858
+
1859
+ {
1860
+ if (typeof type.tag === 'number') {
1861
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
1862
+ }
1863
+ }
1864
+
1865
+ if (typeof type === 'function') {
1866
+ return type.displayName || type.name || null;
1867
+ }
1868
+
1869
+ if (typeof type === 'string') {
1870
+ return type;
1871
+ }
1872
+
1873
+ switch (type) {
1874
+ case REACT_FRAGMENT_TYPE:
1875
+ return 'Fragment';
1876
+
1877
+ case REACT_PORTAL_TYPE:
1878
+ return 'Portal';
1879
+
1880
+ case REACT_PROFILER_TYPE:
1881
+ return "Profiler";
1882
+
1883
+ case REACT_STRICT_MODE_TYPE:
1884
+ return 'StrictMode';
1885
+
1886
+ case REACT_SUSPENSE_TYPE:
1887
+ return 'Suspense';
1888
+
1889
+ case REACT_SUSPENSE_LIST_TYPE:
1890
+ return 'SuspenseList';
1891
+ }
1892
+
1893
+ if (typeof type === 'object') {
1894
+ switch (type.$$typeof) {
1895
+ case REACT_CONTEXT_TYPE:
1896
+ return 'Context.Consumer';
1897
+
1898
+ case REACT_PROVIDER_TYPE:
1899
+ return 'Context.Provider';
1900
+
1901
+ case REACT_FORWARD_REF_TYPE:
1902
+ return getWrappedName(type, type.render, 'ForwardRef');
1903
+
1904
+ case REACT_MEMO_TYPE:
1905
+ return getComponentName(type.type);
1906
+
1907
+ case REACT_BLOCK_TYPE:
1908
+ return getComponentName(type.render);
1909
+
1910
+ case REACT_LAZY_TYPE:
1911
+ {
1912
+ var thenable = type;
1913
+ var resolvedThenable = refineResolvedLazyComponent(thenable);
1914
+
1915
+ if (resolvedThenable) {
1916
+ return getComponentName(resolvedThenable);
1917
+ }
1918
+
1919
+ break;
1920
+ }
1921
+ }
1922
+ }
1923
+
1924
+ return null;
1925
+ }
1926
+
1927
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
1928
+ function describeComponentFrame (name, source, ownerName) {
1929
+ var sourceInfo = '';
1930
+
1931
+ if (source) {
1932
+ var path = source.fileName;
1933
+ var fileName = path.replace(BEFORE_SLASH_RE, '');
1934
+
1935
+ {
1936
+ // In DEV, include code for a common special case:
1937
+ // prefer "folder/index.js" instead of just "index.js".
1938
+ if (/^index\./.test(fileName)) {
1939
+ var match = path.match(BEFORE_SLASH_RE);
1940
+
1941
+ if (match) {
1942
+ var pathBeforeSlash = match[1];
1943
+
1944
+ if (pathBeforeSlash) {
1945
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
1946
+ fileName = folderName + '/' + fileName;
1947
+ }
1948
+ }
1949
+ }
1950
+ }
1951
+
1952
+ sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
1953
+ }
1954
+
1955
+ return '\n in ' + (name || 'Unknown') + sourceInfo;
1956
+ }
1957
+
1958
+ var enableSuspenseServerRenderer = false;
1959
+
1960
+ var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
1961
+
1962
+ var ReactDebugCurrentFrame;
1963
+ var didWarnAboutInvalidateContextType;
1964
+
1965
+ {
1966
+ ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1967
+ didWarnAboutInvalidateContextType = new Set();
1968
+ }
1969
+
1970
+ var emptyObject = {};
1971
+
1972
+ {
1973
+ Object.freeze(emptyObject);
1974
+ }
1975
+
1976
+ function maskContext(type, context) {
1977
+ var contextTypes = type.contextTypes;
1978
+
1979
+ if (!contextTypes) {
1980
+ return emptyObject;
1981
+ }
1982
+
1983
+ var maskedContext = {};
1984
+
1985
+ for (var contextName in contextTypes) {
1986
+ maskedContext[contextName] = context[contextName];
1987
+ }
1988
+
1989
+ return maskedContext;
1990
+ }
1991
+
1992
+ function checkContextTypes(typeSpecs, values, location) {
1993
+ {
1994
+ checkPropTypes(typeSpecs, values, location, 'Component', ReactDebugCurrentFrame.getCurrentStack);
1995
+ }
1996
+ }
1997
+
1998
+ function validateContextBounds(context, threadID) {
1999
+ // If we don't have enough slots in this context to store this threadID,
2000
+ // fill it in without leaving any holes to ensure that the VM optimizes
2001
+ // this as non-holey index properties.
2002
+ // (Note: If `react` package is < 16.6, _threadCount is undefined.)
2003
+ for (var i = context._threadCount | 0; i <= threadID; i++) {
2004
+ // We assume that this is the same as the defaultValue which might not be
2005
+ // true if we're rendering inside a secondary renderer but they are
2006
+ // secondary because these use cases are very rare.
2007
+ context[i] = context._currentValue2;
2008
+ context._threadCount = i + 1;
2009
+ }
2010
+ }
2011
+ function processContext(type, context, threadID, isClass) {
2012
+ if (isClass) {
2013
+ var contextType = type.contextType;
2014
+
2015
+ {
2016
+ if ('contextType' in type) {
2017
+ var isValid = // Allow null for conditional declaration
2018
+ contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
2019
+
2020
+ if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
2021
+ didWarnAboutInvalidateContextType.add(type);
2022
+ var addendum = '';
2023
+
2024
+ if (contextType === undefined) {
2025
+ addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
2026
+ } else if (typeof contextType !== 'object') {
2027
+ addendum = ' However, it is set to a ' + typeof contextType + '.';
2028
+ } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
2029
+ addendum = ' Did you accidentally pass the Context.Provider instead?';
2030
+ } else if (contextType._context !== undefined) {
2031
+ // <Context.Consumer>
2032
+ addendum = ' Did you accidentally pass the Context.Consumer instead?';
2033
+ } else {
2034
+ addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
2035
+ }
2036
+
2037
+ error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
2038
+ }
2039
+ }
2040
+ }
2041
+
2042
+ if (typeof contextType === 'object' && contextType !== null) {
2043
+ validateContextBounds(contextType, threadID);
2044
+ return contextType[threadID];
2045
+ }
2046
+
2047
+ {
2048
+ var maskedContext = maskContext(type, context);
2049
+
2050
+ {
2051
+ if (type.contextTypes) {
2052
+ checkContextTypes(type.contextTypes, maskedContext, 'context');
2053
+ }
2054
+ }
2055
+
2056
+ return maskedContext;
2057
+ }
2058
+ } else {
2059
+ {
2060
+ var _maskedContext = maskContext(type, context);
2061
+
2062
+ {
2063
+ if (type.contextTypes) {
2064
+ checkContextTypes(type.contextTypes, _maskedContext, 'context');
2065
+ }
2066
+ }
2067
+
2068
+ return _maskedContext;
2069
+ }
2070
+ }
2071
+ }
2072
+
2073
+ var nextAvailableThreadIDs = new Uint16Array(16);
2074
+
2075
+ for (var i = 0; i < 15; i++) {
2076
+ nextAvailableThreadIDs[i] = i + 1;
2077
+ }
2078
+
2079
+ nextAvailableThreadIDs[15] = 0;
2080
+
2081
+ function growThreadCountAndReturnNextAvailable() {
2082
+ var oldArray = nextAvailableThreadIDs;
2083
+ var oldSize = oldArray.length;
2084
+ var newSize = oldSize * 2;
2085
+
2086
+ if (!(newSize <= 0x10000)) {
2087
+ {
2088
+ throw Error( "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic." );
2089
+ }
2090
+ }
2091
+
2092
+ var newArray = new Uint16Array(newSize);
2093
+ newArray.set(oldArray);
2094
+ nextAvailableThreadIDs = newArray;
2095
+ nextAvailableThreadIDs[0] = oldSize + 1;
2096
+
2097
+ for (var _i = oldSize; _i < newSize - 1; _i++) {
2098
+ nextAvailableThreadIDs[_i] = _i + 1;
2099
+ }
2100
+
2101
+ nextAvailableThreadIDs[newSize - 1] = 0;
2102
+ return oldSize;
2103
+ }
2104
+
2105
+ function allocThreadID() {
2106
+ var nextID = nextAvailableThreadIDs[0];
2107
+
2108
+ if (nextID === 0) {
2109
+ return growThreadCountAndReturnNextAvailable();
2110
+ }
2111
+
2112
+ nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID];
2113
+ return nextID;
2114
+ }
2115
+ function freeThreadID(id) {
2116
+ nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0];
2117
+ nextAvailableThreadIDs[0] = id;
2118
+ }
2119
+
2120
+ // A reserved attribute.
2121
+ // It is handled by React separately and shouldn't be written to the DOM.
2122
+ var RESERVED = 0; // A simple string attribute.
2123
+ // Attributes that aren't in the whitelist are presumed to have this type.
2124
+
2125
+ var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
2126
+ // "enumerated" attributes with "true" and "false" as possible values.
2127
+ // When true, it should be set to a "true" string.
2128
+ // When false, it should be set to a "false" string.
2129
+
2130
+ var BOOLEANISH_STRING = 2; // A real boolean attribute.
2131
+ // When true, it should be present (set either to an empty string or its name).
2132
+ // When false, it should be omitted.
2133
+
2134
+ var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
2135
+ // When true, it should be present (set either to an empty string or its name).
2136
+ // When false, it should be omitted.
2137
+ // For any other value, should be present with that value.
2138
+
2139
+ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
2140
+ // When falsy, it should be removed.
2141
+
2142
+ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
2143
+ // When falsy, it should be removed.
2144
+
2145
+ var POSITIVE_NUMERIC = 6;
2146
+
2147
+ /* eslint-disable max-len */
2148
+ var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
2149
+ /* eslint-enable max-len */
2150
+
2151
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
2152
+ var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
2153
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
2154
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2155
+ var illegalAttributeNameCache = {};
2156
+ var validatedAttributeNameCache = {};
2157
+ function isAttributeNameSafe(attributeName) {
2158
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
2159
+ return true;
2160
+ }
2161
+
2162
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
2163
+ return false;
2164
+ }
2165
+
2166
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
2167
+ validatedAttributeNameCache[attributeName] = true;
2168
+ return true;
2169
+ }
2170
+
2171
+ illegalAttributeNameCache[attributeName] = true;
2172
+
2173
+ {
2174
+ error('Invalid attribute name: `%s`', attributeName);
2175
+ }
2176
+
2177
+ return false;
2178
+ }
2179
+ function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
2180
+ if (propertyInfo !== null) {
2181
+ return propertyInfo.type === RESERVED;
2182
+ }
2183
+
2184
+ if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
2185
+ return true;
2186
+ }
2187
+
2188
+ return false;
2189
+ }
2190
+ function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
2191
+ if (propertyInfo !== null && propertyInfo.type === RESERVED) {
2192
+ return false;
2193
+ }
2194
+
2195
+ switch (typeof value) {
2196
+ case 'function': // $FlowIssue symbol is perfectly valid here
2197
+
2198
+ case 'symbol':
2199
+ // eslint-disable-line
2200
+ return true;
2201
+
2202
+ case 'boolean':
2203
+ {
2204
+
2205
+ if (propertyInfo !== null) {
2206
+ return !propertyInfo.acceptsBooleans;
2207
+ } else {
2208
+ var prefix = name.toLowerCase().slice(0, 5);
2209
+ return prefix !== 'data-' && prefix !== 'aria-';
2210
+ }
2211
+ }
2212
+
2213
+ default:
2214
+ return false;
2215
+ }
2216
+ }
2217
+ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
2218
+ if (value === null || typeof value === 'undefined') {
2219
+ return true;
2220
+ }
2221
+
2222
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
2223
+ return true;
2224
+ }
2225
+
2226
+ if (propertyInfo !== null) {
2227
+ switch (propertyInfo.type) {
2228
+ case BOOLEAN:
2229
+ return !value;
2230
+
2231
+ case OVERLOADED_BOOLEAN:
2232
+ return value === false;
2233
+
2234
+ case NUMERIC:
2235
+ return isNaN(value);
2236
+
2237
+ case POSITIVE_NUMERIC:
2238
+ return isNaN(value) || value < 1;
2239
+ }
2240
+ }
2241
+
2242
+ return false;
2243
+ }
2244
+ function getPropertyInfo(name) {
2245
+ return properties.hasOwnProperty(name) ? properties[name] : null;
2246
+ }
2247
+
2248
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
2249
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
2250
+ this.attributeName = attributeName;
2251
+ this.attributeNamespace = attributeNamespace;
2252
+ this.mustUseProperty = mustUseProperty;
2253
+ this.propertyName = name;
2254
+ this.type = type;
2255
+ this.sanitizeURL = sanitizeURL;
2256
+ } // When adding attributes to this list, be sure to also add them to
2257
+ // the `possibleStandardNames` module to ensure casing and incorrect
2258
+ // name warnings.
2259
+
2260
+
2261
+ var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
2262
+
2263
+ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
2264
+ // elements (not just inputs). Now that ReactDOMInput assigns to the
2265
+ // defaultValue property -- do we need this?
2266
+ 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
2267
+
2268
+ reservedProps.forEach(function (name) {
2269
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
2270
+ name, // attributeName
2271
+ null, // attributeNamespace
2272
+ false);
2273
+ }); // A few React string attributes have a different name.
2274
+ // This is a mapping from React prop names to the attribute names.
2275
+
2276
+ [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
2277
+ var name = _ref[0],
2278
+ attributeName = _ref[1];
2279
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
2280
+ attributeName, // attributeName
2281
+ null, // attributeNamespace
2282
+ false);
2283
+ }); // These are "enumerated" HTML attributes that accept "true" and "false".
2284
+ // In React, we let users pass `true` and `false` even though technically
2285
+ // these aren't boolean attributes (they are coerced to strings).
2286
+
2287
+ ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
2288
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
2289
+ name.toLowerCase(), // attributeName
2290
+ null, // attributeNamespace
2291
+ false);
2292
+ }); // These are "enumerated" SVG attributes that accept "true" and "false".
2293
+ // In React, we let users pass `true` and `false` even though technically
2294
+ // these aren't boolean attributes (they are coerced to strings).
2295
+ // Since these are SVG attributes, their attribute names are case-sensitive.
2296
+
2297
+ ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
2298
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
2299
+ name, // attributeName
2300
+ null, // attributeNamespace
2301
+ false);
2302
+ }); // These are HTML boolean attributes.
2303
+
2304
+ ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
2305
+ // on the client side because the browsers are inconsistent. Instead we call focus().
2306
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
2307
+ 'itemScope'].forEach(function (name) {
2308
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
2309
+ name.toLowerCase(), // attributeName
2310
+ null, // attributeNamespace
2311
+ false);
2312
+ }); // These are the few React props that we set as DOM properties
2313
+ // rather than attributes. These are all booleans.
2314
+
2315
+ ['checked', // Note: `option.selected` is not updated if `select.multiple` is
2316
+ // disabled with `removeAttribute`. We have special logic for handling this.
2317
+ 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
2318
+ // you'll need to set attributeName to name.toLowerCase()
2319
+ // instead in the assignment below.
2320
+ ].forEach(function (name) {
2321
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
2322
+ name, // attributeName
2323
+ null, // attributeNamespace
2324
+ false);
2325
+ }); // These are HTML attributes that are "overloaded booleans": they behave like
2326
+ // booleans, but can also accept a string value.
2327
+
2328
+ ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
2329
+ // you'll need to set attributeName to name.toLowerCase()
2330
+ // instead in the assignment below.
2331
+ ].forEach(function (name) {
2332
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
2333
+ name, // attributeName
2334
+ null, // attributeNamespace
2335
+ false);
2336
+ }); // These are HTML attributes that must be positive numbers.
2337
+
2338
+ ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
2339
+ // you'll need to set attributeName to name.toLowerCase()
2340
+ // instead in the assignment below.
2341
+ ].forEach(function (name) {
2342
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
2343
+ name, // attributeName
2344
+ null, // attributeNamespace
2345
+ false);
2346
+ }); // These are HTML attributes that must be numbers.
2347
+
2348
+ ['rowSpan', 'start'].forEach(function (name) {
2349
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
2350
+ name.toLowerCase(), // attributeName
2351
+ null, // attributeNamespace
2352
+ false);
2353
+ });
2354
+ var CAMELIZE = /[\-\:]([a-z])/g;
2355
+
2356
+ var capitalize = function (token) {
2357
+ return token[1].toUpperCase();
2358
+ }; // This is a list of all SVG attributes that need special casing, namespacing,
2359
+ // or boolean value assignment. Regular attributes that just accept strings
2360
+ // and have the same names are omitted, just like in the HTML whitelist.
2361
+ // Some of these attributes can be hard to find. This list was created by
2362
+ // scraping the MDN documentation.
2363
+
2364
+
2365
+ ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
2366
+ // you'll need to set attributeName to name.toLowerCase()
2367
+ // instead in the assignment below.
2368
+ ].forEach(function (attributeName) {
2369
+ var name = attributeName.replace(CAMELIZE, capitalize);
2370
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
2371
+ attributeName, null, // attributeNamespace
2372
+ false);
2373
+ }); // String SVG attributes with the xlink namespace.
2374
+
2375
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
2376
+ // you'll need to set attributeName to name.toLowerCase()
2377
+ // instead in the assignment below.
2378
+ ].forEach(function (attributeName) {
2379
+ var name = attributeName.replace(CAMELIZE, capitalize);
2380
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
2381
+ attributeName, 'http://www.w3.org/1999/xlink', false);
2382
+ }); // String SVG attributes with the xml namespace.
2383
+
2384
+ ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
2385
+ // you'll need to set attributeName to name.toLowerCase()
2386
+ // instead in the assignment below.
2387
+ ].forEach(function (attributeName) {
2388
+ var name = attributeName.replace(CAMELIZE, capitalize);
2389
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
2390
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false);
2391
+ }); // These attribute exists both in HTML and SVG.
2392
+ // The attribute name is case-sensitive in SVG so we can't just use
2393
+ // the React name like we do for attributes that exist only in HTML.
2394
+
2395
+ ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
2396
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
2397
+ attributeName.toLowerCase(), // attributeName
2398
+ null, // attributeNamespace
2399
+ false);
2400
+ }); // These attributes accept URLs. These must not allow javascript: URLS.
2401
+ // These will also need to accept Trusted Types object in the future.
2402
+
2403
+ var xlinkHref = 'xlinkHref';
2404
+ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
2405
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true);
2406
+ ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
2407
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
2408
+ attributeName.toLowerCase(), // attributeName
2409
+ null, // attributeNamespace
2410
+ true);
2411
+ });
2412
+
2413
+ {
2414
+ ReactSharedInternals.ReactDebugCurrentFrame;
2415
+ } // A javascript: URL can contain leading C0 control or \u0020 SPACE,
2416
+ // and any newline or tab are filtered out as if they're not part of the URL.
2417
+ // https://url.spec.whatwg.org/#url-parsing
2418
+ // Tab or newline are defined as \r\n\t:
2419
+ // https://infra.spec.whatwg.org/#ascii-tab-or-newline
2420
+ // A C0 control is a code point in the range \u0000 NULL to \u001F
2421
+ // INFORMATION SEPARATOR ONE, inclusive:
2422
+ // https://infra.spec.whatwg.org/#c0-control-or-space
2423
+
2424
+ /* eslint-disable max-len */
2425
+
2426
+
2427
+ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
2428
+ var didWarn = false;
2429
+
2430
+ function sanitizeURL(url) {
2431
+ {
2432
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
2433
+ didWarn = true;
2434
+
2435
+ error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
2436
+ }
2437
+ }
2438
+ }
2439
+
2440
+ // code copied and modified from escape-html
2441
+
2442
+ /**
2443
+ * Module variables.
2444
+ * @private
2445
+ */
2446
+ var matchHtmlRegExp = /["'&<>]/;
2447
+ /**
2448
+ * Escapes special characters and HTML entities in a given html string.
2449
+ *
2450
+ * @param {string} string HTML string to escape for later insertion
2451
+ * @return {string}
2452
+ * @public
2453
+ */
2454
+
2455
+ function escapeHtml(string) {
2456
+ var str = '' + string;
2457
+ var match = matchHtmlRegExp.exec(str);
2458
+
2459
+ if (!match) {
2460
+ return str;
2461
+ }
2462
+
2463
+ var escape;
2464
+ var html = '';
2465
+ var index;
2466
+ var lastIndex = 0;
2467
+
2468
+ for (index = match.index; index < str.length; index++) {
2469
+ switch (str.charCodeAt(index)) {
2470
+ case 34:
2471
+ // "
2472
+ escape = '&quot;';
2473
+ break;
2474
+
2475
+ case 38:
2476
+ // &
2477
+ escape = '&amp;';
2478
+ break;
2479
+
2480
+ case 39:
2481
+ // '
2482
+ escape = '&#x27;'; // modified from escape-html; used to be '&#39'
2483
+
2484
+ break;
2485
+
2486
+ case 60:
2487
+ // <
2488
+ escape = '&lt;';
2489
+ break;
2490
+
2491
+ case 62:
2492
+ // >
2493
+ escape = '&gt;';
2494
+ break;
2495
+
2496
+ default:
2497
+ continue;
2498
+ }
2499
+
2500
+ if (lastIndex !== index) {
2501
+ html += str.substring(lastIndex, index);
2502
+ }
2503
+
2504
+ lastIndex = index + 1;
2505
+ html += escape;
2506
+ }
2507
+
2508
+ return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
2509
+ } // end code copied and modified from escape-html
2510
+
2511
+ /**
2512
+ * Escapes text to prevent scripting attacks.
2513
+ *
2514
+ * @param {*} text Text value to escape.
2515
+ * @return {string} An escaped string.
2516
+ */
2517
+
2518
+
2519
+ function escapeTextForBrowser(text) {
2520
+ if (typeof text === 'boolean' || typeof text === 'number') {
2521
+ // this shortcircuit helps perf for types that we know will never have
2522
+ // special characters, especially given that this function is used often
2523
+ // for numeric dom ids.
2524
+ return '' + text;
2525
+ }
2526
+
2527
+ return escapeHtml(text);
2528
+ }
2529
+
2530
+ /**
2531
+ * Escapes attribute value to prevent scripting attacks.
2532
+ *
2533
+ * @param {*} value Value to escape.
2534
+ * @return {string} An escaped string.
2535
+ */
2536
+
2537
+ function quoteAttributeValueForBrowser(value) {
2538
+ return '"' + escapeTextForBrowser(value) + '"';
2539
+ }
2540
+
2541
+ function createMarkupForRoot() {
2542
+ return ROOT_ATTRIBUTE_NAME + '=""';
2543
+ }
2544
+ /**
2545
+ * Creates markup for a property.
2546
+ *
2547
+ * @param {string} name
2548
+ * @param {*} value
2549
+ * @return {?string} Markup string, or null if the property was invalid.
2550
+ */
2551
+
2552
+ function createMarkupForProperty(name, value) {
2553
+ var propertyInfo = getPropertyInfo(name);
2554
+
2555
+ if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo)) {
2556
+ return '';
2557
+ }
2558
+
2559
+ if (shouldRemoveAttribute(name, value, propertyInfo)) {
2560
+ return '';
2561
+ }
2562
+
2563
+ if (propertyInfo !== null) {
2564
+ var attributeName = propertyInfo.attributeName;
2565
+ var type = propertyInfo.type;
2566
+
2567
+ if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
2568
+ return attributeName + '=""';
2569
+ } else {
2570
+ if (propertyInfo.sanitizeURL) {
2571
+ value = '' + value;
2572
+ sanitizeURL(value);
2573
+ }
2574
+
2575
+ return attributeName + '=' + quoteAttributeValueForBrowser(value);
2576
+ }
2577
+ } else if (isAttributeNameSafe(name)) {
2578
+ return name + '=' + quoteAttributeValueForBrowser(value);
2579
+ }
2580
+
2581
+ return '';
2582
+ }
2583
+ /**
2584
+ * Creates markup for a custom property.
2585
+ *
2586
+ * @param {string} name
2587
+ * @param {*} value
2588
+ * @return {string} Markup string, or empty string if the property was invalid.
2589
+ */
2590
+
2591
+ function createMarkupForCustomAttribute(name, value) {
2592
+ if (!isAttributeNameSafe(name) || value == null) {
2593
+ return '';
2594
+ }
2595
+
2596
+ return name + '=' + quoteAttributeValueForBrowser(value);
2597
+ }
2598
+
2599
+ /**
2600
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
2601
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2602
+ */
2603
+ function is(x, y) {
2604
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
2605
+ ;
2606
+ }
2607
+
2608
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
2609
+
2610
+ var currentlyRenderingComponent = null;
2611
+ var firstWorkInProgressHook = null;
2612
+ var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook
2613
+
2614
+ var isReRender = false; // Whether an update was scheduled during the currently executing render pass.
2615
+
2616
+ var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates
2617
+
2618
+ var renderPhaseUpdates = null; // Counter to prevent infinite loops.
2619
+
2620
+ var numberOfReRenders = 0;
2621
+ var RE_RENDER_LIMIT = 25;
2622
+ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook
2623
+
2624
+ var currentHookNameInDev;
2625
+
2626
+ function resolveCurrentlyRenderingComponent() {
2627
+ if (!(currentlyRenderingComponent !== null)) {
2628
+ {
2629
+ throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
2630
+ }
2631
+ }
2632
+
2633
+ {
2634
+ if (isInHookUserCodeInDev) {
2635
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
2636
+ }
2637
+ }
2638
+
2639
+ return currentlyRenderingComponent;
2640
+ }
2641
+
2642
+ function areHookInputsEqual(nextDeps, prevDeps) {
2643
+ if (prevDeps === null) {
2644
+ {
2645
+ error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
2646
+ }
2647
+
2648
+ return false;
2649
+ }
2650
+
2651
+ {
2652
+ // Don't bother comparing lengths in prod because these arrays should be
2653
+ // passed inline.
2654
+ if (nextDeps.length !== prevDeps.length) {
2655
+ error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + nextDeps.join(', ') + "]", "[" + prevDeps.join(', ') + "]");
2656
+ }
2657
+ }
2658
+
2659
+ for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
2660
+ if (objectIs(nextDeps[i], prevDeps[i])) {
2661
+ continue;
2662
+ }
2663
+
2664
+ return false;
2665
+ }
2666
+
2667
+ return true;
2668
+ }
2669
+
2670
+ function createHook() {
2671
+ if (numberOfReRenders > 0) {
2672
+ {
2673
+ {
2674
+ throw Error( "Rendered more hooks than during the previous render" );
2675
+ }
2676
+ }
2677
+ }
2678
+
2679
+ return {
2680
+ memoizedState: null,
2681
+ queue: null,
2682
+ next: null
2683
+ };
2684
+ }
2685
+
2686
+ function createWorkInProgressHook() {
2687
+ if (workInProgressHook === null) {
2688
+ // This is the first hook in the list
2689
+ if (firstWorkInProgressHook === null) {
2690
+ isReRender = false;
2691
+ firstWorkInProgressHook = workInProgressHook = createHook();
2692
+ } else {
2693
+ // There's already a work-in-progress. Reuse it.
2694
+ isReRender = true;
2695
+ workInProgressHook = firstWorkInProgressHook;
2696
+ }
2697
+ } else {
2698
+ if (workInProgressHook.next === null) {
2699
+ isReRender = false; // Append to the end of the list
2700
+
2701
+ workInProgressHook = workInProgressHook.next = createHook();
2702
+ } else {
2703
+ // There's already a work-in-progress. Reuse it.
2704
+ isReRender = true;
2705
+ workInProgressHook = workInProgressHook.next;
2706
+ }
2707
+ }
2708
+
2709
+ return workInProgressHook;
2710
+ }
2711
+
2712
+ function prepareToUseHooks(componentIdentity) {
2713
+ currentlyRenderingComponent = componentIdentity;
2714
+
2715
+ {
2716
+ isInHookUserCodeInDev = false;
2717
+ } // The following should have already been reset
2718
+ // didScheduleRenderPhaseUpdate = false;
2719
+ // firstWorkInProgressHook = null;
2720
+ // numberOfReRenders = 0;
2721
+ // renderPhaseUpdates = null;
2722
+ // workInProgressHook = null;
2723
+
2724
+ }
2725
+ function finishHooks(Component, props, children, refOrContext) {
2726
+ // This must be called after every function component to prevent hooks from
2727
+ // being used in classes.
2728
+ while (didScheduleRenderPhaseUpdate) {
2729
+ // Updates were scheduled during the render phase. They are stored in
2730
+ // the `renderPhaseUpdates` map. Call the component again, reusing the
2731
+ // work-in-progress hooks and applying the additional updates on top. Keep
2732
+ // restarting until no more updates are scheduled.
2733
+ didScheduleRenderPhaseUpdate = false;
2734
+ numberOfReRenders += 1; // Start over from the beginning of the list
2735
+
2736
+ workInProgressHook = null;
2737
+ children = Component(props, refOrContext);
2738
+ }
2739
+
2740
+ currentlyRenderingComponent = null;
2741
+ firstWorkInProgressHook = null;
2742
+ numberOfReRenders = 0;
2743
+ renderPhaseUpdates = null;
2744
+ workInProgressHook = null;
2745
+
2746
+ {
2747
+ isInHookUserCodeInDev = false;
2748
+ } // These were reset above
2749
+ // currentlyRenderingComponent = null;
2750
+ // didScheduleRenderPhaseUpdate = false;
2751
+ // firstWorkInProgressHook = null;
2752
+ // numberOfReRenders = 0;
2753
+ // renderPhaseUpdates = null;
2754
+ // workInProgressHook = null;
2755
+
2756
+
2757
+ return children;
2758
+ }
2759
+
2760
+ function readContext(context, observedBits) {
2761
+ var threadID = currentThreadID;
2762
+ validateContextBounds(context, threadID);
2763
+
2764
+ {
2765
+ if (isInHookUserCodeInDev) {
2766
+ error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
2767
+ }
2768
+ }
2769
+
2770
+ return context[threadID];
2771
+ }
2772
+
2773
+ function useContext(context, observedBits) {
2774
+ {
2775
+ currentHookNameInDev = 'useContext';
2776
+ }
2777
+
2778
+ resolveCurrentlyRenderingComponent();
2779
+ var threadID = currentThreadID;
2780
+ validateContextBounds(context, threadID);
2781
+ return context[threadID];
2782
+ }
2783
+
2784
+ function basicStateReducer(state, action) {
2785
+ // $FlowFixMe: Flow doesn't like mixed types
2786
+ return typeof action === 'function' ? action(state) : action;
2787
+ }
2788
+
2789
+ function useState(initialState) {
2790
+ {
2791
+ currentHookNameInDev = 'useState';
2792
+ }
2793
+
2794
+ return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers
2795
+ initialState);
2796
+ }
2797
+ function useReducer(reducer, initialArg, init) {
2798
+ {
2799
+ if (reducer !== basicStateReducer) {
2800
+ currentHookNameInDev = 'useReducer';
2801
+ }
2802
+ }
2803
+
2804
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
2805
+ workInProgressHook = createWorkInProgressHook();
2806
+
2807
+ if (isReRender) {
2808
+ // This is a re-render. Apply the new render phase updates to the previous
2809
+ // current hook.
2810
+ var queue = workInProgressHook.queue;
2811
+ var dispatch = queue.dispatch;
2812
+
2813
+ if (renderPhaseUpdates !== null) {
2814
+ // Render phase updates are stored in a map of queue -> linked list
2815
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
2816
+
2817
+ if (firstRenderPhaseUpdate !== undefined) {
2818
+ renderPhaseUpdates.delete(queue);
2819
+ var newState = workInProgressHook.memoizedState;
2820
+ var update = firstRenderPhaseUpdate;
2821
+
2822
+ do {
2823
+ // Process this render phase update. We don't have to check the
2824
+ // priority because it will always be the same as the current
2825
+ // render's.
2826
+ var action = update.action;
2827
+
2828
+ {
2829
+ isInHookUserCodeInDev = true;
2830
+ }
2831
+
2832
+ newState = reducer(newState, action);
2833
+
2834
+ {
2835
+ isInHookUserCodeInDev = false;
2836
+ }
2837
+
2838
+ update = update.next;
2839
+ } while (update !== null);
2840
+
2841
+ workInProgressHook.memoizedState = newState;
2842
+ return [newState, dispatch];
2843
+ }
2844
+ }
2845
+
2846
+ return [workInProgressHook.memoizedState, dispatch];
2847
+ } else {
2848
+ {
2849
+ isInHookUserCodeInDev = true;
2850
+ }
2851
+
2852
+ var initialState;
2853
+
2854
+ if (reducer === basicStateReducer) {
2855
+ // Special case for `useState`.
2856
+ initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
2857
+ } else {
2858
+ initialState = init !== undefined ? init(initialArg) : initialArg;
2859
+ }
2860
+
2861
+ {
2862
+ isInHookUserCodeInDev = false;
2863
+ }
2864
+
2865
+ workInProgressHook.memoizedState = initialState;
2866
+
2867
+ var _queue = workInProgressHook.queue = {
2868
+ last: null,
2869
+ dispatch: null
2870
+ };
2871
+
2872
+ var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
2873
+
2874
+ return [workInProgressHook.memoizedState, _dispatch];
2875
+ }
2876
+ }
2877
+
2878
+ function useMemo(nextCreate, deps) {
2879
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
2880
+ workInProgressHook = createWorkInProgressHook();
2881
+ var nextDeps = deps === undefined ? null : deps;
2882
+
2883
+ if (workInProgressHook !== null) {
2884
+ var prevState = workInProgressHook.memoizedState;
2885
+
2886
+ if (prevState !== null) {
2887
+ if (nextDeps !== null) {
2888
+ var prevDeps = prevState[1];
2889
+
2890
+ if (areHookInputsEqual(nextDeps, prevDeps)) {
2891
+ return prevState[0];
2892
+ }
2893
+ }
2894
+ }
2895
+ }
2896
+
2897
+ {
2898
+ isInHookUserCodeInDev = true;
2899
+ }
2900
+
2901
+ var nextValue = nextCreate();
2902
+
2903
+ {
2904
+ isInHookUserCodeInDev = false;
2905
+ }
2906
+
2907
+ workInProgressHook.memoizedState = [nextValue, nextDeps];
2908
+ return nextValue;
2909
+ }
2910
+
2911
+ function useRef(initialValue) {
2912
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
2913
+ workInProgressHook = createWorkInProgressHook();
2914
+ var previousRef = workInProgressHook.memoizedState;
2915
+
2916
+ if (previousRef === null) {
2917
+ var ref = {
2918
+ current: initialValue
2919
+ };
2920
+
2921
+ {
2922
+ Object.seal(ref);
2923
+ }
2924
+
2925
+ workInProgressHook.memoizedState = ref;
2926
+ return ref;
2927
+ } else {
2928
+ return previousRef;
2929
+ }
2930
+ }
2931
+
2932
+ function useLayoutEffect(create, inputs) {
2933
+ {
2934
+ currentHookNameInDev = 'useLayoutEffect';
2935
+
2936
+ error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.');
2937
+ }
2938
+ }
2939
+
2940
+ function dispatchAction(componentIdentity, queue, action) {
2941
+ if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
2942
+ {
2943
+ throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
2944
+ }
2945
+ }
2946
+
2947
+ if (componentIdentity === currentlyRenderingComponent) {
2948
+ // This is a render phase update. Stash it in a lazily-created map of
2949
+ // queue -> linked list of updates. After this render pass, we'll restart
2950
+ // and apply the stashed updates on top of the work-in-progress hook.
2951
+ didScheduleRenderPhaseUpdate = true;
2952
+ var update = {
2953
+ action: action,
2954
+ next: null
2955
+ };
2956
+
2957
+ if (renderPhaseUpdates === null) {
2958
+ renderPhaseUpdates = new Map();
2959
+ }
2960
+
2961
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
2962
+
2963
+ if (firstRenderPhaseUpdate === undefined) {
2964
+ renderPhaseUpdates.set(queue, update);
2965
+ } else {
2966
+ // Append the update to the end of the list.
2967
+ var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
2968
+
2969
+ while (lastRenderPhaseUpdate.next !== null) {
2970
+ lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
2971
+ }
2972
+
2973
+ lastRenderPhaseUpdate.next = update;
2974
+ }
2975
+ }
2976
+ }
2977
+
2978
+ function useCallback(callback, deps) {
2979
+ // Callbacks are passed as they are in the server environment.
2980
+ return callback;
2981
+ }
2982
+
2983
+ function useResponder(responder, props) {
2984
+ return {
2985
+ props: props,
2986
+ responder: responder
2987
+ };
2988
+ }
2989
+
2990
+ function useDeferredValue(value, config) {
2991
+ resolveCurrentlyRenderingComponent();
2992
+ return value;
2993
+ }
2994
+
2995
+ function useTransition(config) {
2996
+ resolveCurrentlyRenderingComponent();
2997
+
2998
+ var startTransition = function (callback) {
2999
+ callback();
3000
+ };
3001
+
3002
+ return [startTransition, false];
3003
+ }
3004
+
3005
+ function noop() {}
3006
+
3007
+ var currentThreadID = 0;
3008
+ function setCurrentThreadID(threadID) {
3009
+ currentThreadID = threadID;
3010
+ }
3011
+ var Dispatcher = {
3012
+ readContext: readContext,
3013
+ useContext: useContext,
3014
+ useMemo: useMemo,
3015
+ useReducer: useReducer,
3016
+ useRef: useRef,
3017
+ useState: useState,
3018
+ useLayoutEffect: useLayoutEffect,
3019
+ useCallback: useCallback,
3020
+ // useImperativeHandle is not run in the server environment
3021
+ useImperativeHandle: noop,
3022
+ // Effects are not run in the server environment.
3023
+ useEffect: noop,
3024
+ // Debugging effect
3025
+ useDebugValue: noop,
3026
+ useResponder: useResponder,
3027
+ useDeferredValue: useDeferredValue,
3028
+ useTransition: useTransition
3029
+ };
3030
+
3031
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
3032
+ var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
3033
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
3034
+ var Namespaces = {
3035
+ html: HTML_NAMESPACE}; // Assumes there is no parent namespace.
3036
+
3037
+ function getIntrinsicNamespace(type) {
3038
+ switch (type) {
3039
+ case 'svg':
3040
+ return SVG_NAMESPACE;
3041
+
3042
+ case 'math':
3043
+ return MATH_NAMESPACE;
3044
+
3045
+ default:
3046
+ return HTML_NAMESPACE;
3047
+ }
3048
+ }
3049
+ function getChildNamespace(parentNamespace, type) {
3050
+ if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
3051
+ // No (or default) parent namespace: potential entry point.
3052
+ return getIntrinsicNamespace(type);
3053
+ }
3054
+
3055
+ if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
3056
+ // We're leaving SVG.
3057
+ return HTML_NAMESPACE;
3058
+ } // By default, pass namespace below.
3059
+
3060
+
3061
+ return parentNamespace;
3062
+ }
3063
+
3064
+ var ReactDebugCurrentFrame$2 = null;
3065
+ var ReactControlledValuePropTypes = {
3066
+ checkPropTypes: null
3067
+ };
3068
+
3069
+ {
3070
+ ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
3071
+ var hasReadOnlyValue = {
3072
+ button: true,
3073
+ checkbox: true,
3074
+ image: true,
3075
+ hidden: true,
3076
+ radio: true,
3077
+ reset: true,
3078
+ submit: true
3079
+ };
3080
+ var propTypes = {
3081
+ value: function (props, propName, componentName) {
3082
+ if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
3083
+ return null;
3084
+ }
3085
+
3086
+ return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
3087
+ },
3088
+ checked: function (props, propName, componentName) {
3089
+ if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
3090
+ return null;
3091
+ }
3092
+
3093
+ return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
3094
+ }
3095
+ };
3096
+ /**
3097
+ * Provide a linked `value` attribute for controlled forms. You should not use
3098
+ * this outside of the ReactDOM controlled form components.
3099
+ */
3100
+
3101
+ ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
3102
+ checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
3103
+ };
3104
+ }
3105
+
3106
+ // For HTML, certain tags should omit their close tag. We keep a whitelist for
3107
+ // those special-case tags.
3108
+ var omittedCloseTags = {
3109
+ area: true,
3110
+ base: true,
3111
+ br: true,
3112
+ col: true,
3113
+ embed: true,
3114
+ hr: true,
3115
+ img: true,
3116
+ input: true,
3117
+ keygen: true,
3118
+ link: true,
3119
+ meta: true,
3120
+ param: true,
3121
+ source: true,
3122
+ track: true,
3123
+ wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
3124
+
3125
+ };
3126
+
3127
+ // `omittedCloseTags` except that `menuitem` should still have its closing tag.
3128
+
3129
+ var voidElementTags = _assign({
3130
+ menuitem: true
3131
+ }, omittedCloseTags);
3132
+
3133
+ var HTML = '__html';
3134
+ var ReactDebugCurrentFrame$3 = null;
3135
+
3136
+ {
3137
+ ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
3138
+ }
3139
+
3140
+ function assertValidProps(tag, props) {
3141
+ if (!props) {
3142
+ return;
3143
+ } // Note the use of `==` which checks for null or undefined.
3144
+
3145
+
3146
+ if (voidElementTags[tag]) {
3147
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
3148
+ {
3149
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
3150
+ }
3151
+ }
3152
+ }
3153
+
3154
+ if (props.dangerouslySetInnerHTML != null) {
3155
+ if (!(props.children == null)) {
3156
+ {
3157
+ throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
3158
+ }
3159
+ }
3160
+
3161
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
3162
+ {
3163
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
3164
+ }
3165
+ }
3166
+ }
3167
+
3168
+ {
3169
+ if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
3170
+ error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');
3171
+ }
3172
+ }
3173
+
3174
+ if (!(props.style == null || typeof props.style === 'object')) {
3175
+ {
3176
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
3177
+ }
3178
+ }
3179
+ }
3180
+
3181
+ /**
3182
+ * CSS properties which accept numbers but are not in units of "px".
3183
+ */
3184
+ var isUnitlessNumber = {
3185
+ animationIterationCount: true,
3186
+ borderImageOutset: true,
3187
+ borderImageSlice: true,
3188
+ borderImageWidth: true,
3189
+ boxFlex: true,
3190
+ boxFlexGroup: true,
3191
+ boxOrdinalGroup: true,
3192
+ columnCount: true,
3193
+ columns: true,
3194
+ flex: true,
3195
+ flexGrow: true,
3196
+ flexPositive: true,
3197
+ flexShrink: true,
3198
+ flexNegative: true,
3199
+ flexOrder: true,
3200
+ gridArea: true,
3201
+ gridRow: true,
3202
+ gridRowEnd: true,
3203
+ gridRowSpan: true,
3204
+ gridRowStart: true,
3205
+ gridColumn: true,
3206
+ gridColumnEnd: true,
3207
+ gridColumnSpan: true,
3208
+ gridColumnStart: true,
3209
+ fontWeight: true,
3210
+ lineClamp: true,
3211
+ lineHeight: true,
3212
+ opacity: true,
3213
+ order: true,
3214
+ orphans: true,
3215
+ tabSize: true,
3216
+ widows: true,
3217
+ zIndex: true,
3218
+ zoom: true,
3219
+ // SVG-related properties
3220
+ fillOpacity: true,
3221
+ floodOpacity: true,
3222
+ stopOpacity: true,
3223
+ strokeDasharray: true,
3224
+ strokeDashoffset: true,
3225
+ strokeMiterlimit: true,
3226
+ strokeOpacity: true,
3227
+ strokeWidth: true
3228
+ };
3229
+ /**
3230
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
3231
+ * @param {string} key style name, eg: transitionDuration
3232
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
3233
+ * WebkitTransitionDuration
3234
+ */
3235
+
3236
+ function prefixKey(prefix, key) {
3237
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
3238
+ }
3239
+ /**
3240
+ * Support style names that may come passed in prefixed by adding permutations
3241
+ * of vendor prefixes.
3242
+ */
3243
+
3244
+
3245
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
3246
+ // infinite loop, because it iterates over the newly added props too.
3247
+
3248
+ Object.keys(isUnitlessNumber).forEach(function (prop) {
3249
+ prefixes.forEach(function (prefix) {
3250
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
3251
+ });
3252
+ });
3253
+
3254
+ /**
3255
+ * Convert a value into the proper css writable value. The style name `name`
3256
+ * should be logical (no hyphens), as specified
3257
+ * in `CSSProperty.isUnitlessNumber`.
3258
+ *
3259
+ * @param {string} name CSS property name such as `topMargin`.
3260
+ * @param {*} value CSS property value such as `10px`.
3261
+ * @return {string} Normalized style value with dimensions applied.
3262
+ */
3263
+
3264
+ function dangerousStyleValue(name, value, isCustomProperty) {
3265
+ // Note that we've removed escapeTextForBrowser() calls here since the
3266
+ // whole string will be escaped when the attribute is injected into
3267
+ // the markup. If you provide unsafe user data here they can inject
3268
+ // arbitrary CSS which may be problematic (I couldn't repro this):
3269
+ // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
3270
+ // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
3271
+ // This is not an XSS hole but instead a potential CSS injection issue
3272
+ // which has lead to a greater discussion about how we're going to
3273
+ // trust URLs moving forward. See #2115901
3274
+ var isEmpty = value == null || typeof value === 'boolean' || value === '';
3275
+
3276
+ if (isEmpty) {
3277
+ return '';
3278
+ }
3279
+
3280
+ if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
3281
+ return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
3282
+ }
3283
+
3284
+ return ('' + value).trim();
3285
+ }
3286
+
3287
+ var uppercasePattern = /([A-Z])/g;
3288
+ var msPattern = /^ms-/;
3289
+ /**
3290
+ * Hyphenates a camelcased CSS property name, for example:
3291
+ *
3292
+ * > hyphenateStyleName('backgroundColor')
3293
+ * < "background-color"
3294
+ * > hyphenateStyleName('MozTransition')
3295
+ * < "-moz-transition"
3296
+ * > hyphenateStyleName('msTransition')
3297
+ * < "-ms-transition"
3298
+ *
3299
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
3300
+ * is converted to `-ms-`.
3301
+ */
3302
+
3303
+ function hyphenateStyleName(name) {
3304
+ return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
3305
+ }
3306
+
3307
+ function isCustomComponent(tagName, props) {
3308
+ if (tagName.indexOf('-') === -1) {
3309
+ return typeof props.is === 'string';
3310
+ }
3311
+
3312
+ switch (tagName) {
3313
+ // These are reserved SVG and MathML elements.
3314
+ // We don't mind this whitelist too much because we expect it to never grow.
3315
+ // The alternative is to track the namespace in a few places which is convoluted.
3316
+ // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
3317
+ case 'annotation-xml':
3318
+ case 'color-profile':
3319
+ case 'font-face':
3320
+ case 'font-face-src':
3321
+ case 'font-face-uri':
3322
+ case 'font-face-format':
3323
+ case 'font-face-name':
3324
+ case 'missing-glyph':
3325
+ return false;
3326
+
3327
+ default:
3328
+ return true;
3329
+ }
3330
+ }
3331
+
3332
+ var warnValidStyle = function () {};
3333
+
3334
+ {
3335
+ // 'msTransform' is correct, but the other prefixes should be capitalized
3336
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
3337
+ var msPattern$1 = /^-ms-/;
3338
+ var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
3339
+
3340
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
3341
+ var warnedStyleNames = {};
3342
+ var warnedStyleValues = {};
3343
+ var warnedForNaNValue = false;
3344
+ var warnedForInfinityValue = false;
3345
+
3346
+ var camelize = function (string) {
3347
+ return string.replace(hyphenPattern, function (_, character) {
3348
+ return character.toUpperCase();
3349
+ });
3350
+ };
3351
+
3352
+ var warnHyphenatedStyleName = function (name) {
3353
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
3354
+ return;
3355
+ }
3356
+
3357
+ warnedStyleNames[name] = true;
3358
+
3359
+ error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
3360
+ // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
3361
+ // is converted to lowercase `ms`.
3362
+ camelize(name.replace(msPattern$1, 'ms-')));
3363
+ };
3364
+
3365
+ var warnBadVendoredStyleName = function (name) {
3366
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
3367
+ return;
3368
+ }
3369
+
3370
+ warnedStyleNames[name] = true;
3371
+
3372
+ error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
3373
+ };
3374
+
3375
+ var warnStyleValueWithSemicolon = function (name, value) {
3376
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
3377
+ return;
3378
+ }
3379
+
3380
+ warnedStyleValues[value] = true;
3381
+
3382
+ error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
3383
+ };
3384
+
3385
+ var warnStyleValueIsNaN = function (name, value) {
3386
+ if (warnedForNaNValue) {
3387
+ return;
3388
+ }
3389
+
3390
+ warnedForNaNValue = true;
3391
+
3392
+ error('`NaN` is an invalid value for the `%s` css style property.', name);
3393
+ };
3394
+
3395
+ var warnStyleValueIsInfinity = function (name, value) {
3396
+ if (warnedForInfinityValue) {
3397
+ return;
3398
+ }
3399
+
3400
+ warnedForInfinityValue = true;
3401
+
3402
+ error('`Infinity` is an invalid value for the `%s` css style property.', name);
3403
+ };
3404
+
3405
+ warnValidStyle = function (name, value) {
3406
+ if (name.indexOf('-') > -1) {
3407
+ warnHyphenatedStyleName(name);
3408
+ } else if (badVendoredStyleNamePattern.test(name)) {
3409
+ warnBadVendoredStyleName(name);
3410
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
3411
+ warnStyleValueWithSemicolon(name, value);
3412
+ }
3413
+
3414
+ if (typeof value === 'number') {
3415
+ if (isNaN(value)) {
3416
+ warnStyleValueIsNaN(name, value);
3417
+ } else if (!isFinite(value)) {
3418
+ warnStyleValueIsInfinity(name, value);
3419
+ }
3420
+ }
3421
+ };
3422
+ }
3423
+
3424
+ var warnValidStyle$1 = warnValidStyle;
3425
+
3426
+ var ariaProperties = {
3427
+ 'aria-current': 0,
3428
+ // state
3429
+ 'aria-details': 0,
3430
+ 'aria-disabled': 0,
3431
+ // state
3432
+ 'aria-hidden': 0,
3433
+ // state
3434
+ 'aria-invalid': 0,
3435
+ // state
3436
+ 'aria-keyshortcuts': 0,
3437
+ 'aria-label': 0,
3438
+ 'aria-roledescription': 0,
3439
+ // Widget Attributes
3440
+ 'aria-autocomplete': 0,
3441
+ 'aria-checked': 0,
3442
+ 'aria-expanded': 0,
3443
+ 'aria-haspopup': 0,
3444
+ 'aria-level': 0,
3445
+ 'aria-modal': 0,
3446
+ 'aria-multiline': 0,
3447
+ 'aria-multiselectable': 0,
3448
+ 'aria-orientation': 0,
3449
+ 'aria-placeholder': 0,
3450
+ 'aria-pressed': 0,
3451
+ 'aria-readonly': 0,
3452
+ 'aria-required': 0,
3453
+ 'aria-selected': 0,
3454
+ 'aria-sort': 0,
3455
+ 'aria-valuemax': 0,
3456
+ 'aria-valuemin': 0,
3457
+ 'aria-valuenow': 0,
3458
+ 'aria-valuetext': 0,
3459
+ // Live Region Attributes
3460
+ 'aria-atomic': 0,
3461
+ 'aria-busy': 0,
3462
+ 'aria-live': 0,
3463
+ 'aria-relevant': 0,
3464
+ // Drag-and-Drop Attributes
3465
+ 'aria-dropeffect': 0,
3466
+ 'aria-grabbed': 0,
3467
+ // Relationship Attributes
3468
+ 'aria-activedescendant': 0,
3469
+ 'aria-colcount': 0,
3470
+ 'aria-colindex': 0,
3471
+ 'aria-colspan': 0,
3472
+ 'aria-controls': 0,
3473
+ 'aria-describedby': 0,
3474
+ 'aria-errormessage': 0,
3475
+ 'aria-flowto': 0,
3476
+ 'aria-labelledby': 0,
3477
+ 'aria-owns': 0,
3478
+ 'aria-posinset': 0,
3479
+ 'aria-rowcount': 0,
3480
+ 'aria-rowindex': 0,
3481
+ 'aria-rowspan': 0,
3482
+ 'aria-setsize': 0
3483
+ };
3484
+
3485
+ var warnedProperties = {};
3486
+ var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
3487
+ var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
3488
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
3489
+
3490
+ function validateProperty(tagName, name) {
3491
+ {
3492
+ if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
3493
+ return true;
3494
+ }
3495
+
3496
+ if (rARIACamel.test(name)) {
3497
+ var ariaName = 'aria-' + name.slice(4).toLowerCase();
3498
+ var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
3499
+ // DOM properties, then it is an invalid aria-* attribute.
3500
+
3501
+ if (correctName == null) {
3502
+ error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
3503
+
3504
+ warnedProperties[name] = true;
3505
+ return true;
3506
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
3507
+
3508
+
3509
+ if (name !== correctName) {
3510
+ error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
3511
+
3512
+ warnedProperties[name] = true;
3513
+ return true;
3514
+ }
3515
+ }
3516
+
3517
+ if (rARIA.test(name)) {
3518
+ var lowerCasedName = name.toLowerCase();
3519
+ var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
3520
+ // DOM properties, then it is an invalid aria-* attribute.
3521
+
3522
+ if (standardName == null) {
3523
+ warnedProperties[name] = true;
3524
+ return false;
3525
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
3526
+
3527
+
3528
+ if (name !== standardName) {
3529
+ error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
3530
+
3531
+ warnedProperties[name] = true;
3532
+ return true;
3533
+ }
3534
+ }
3535
+ }
3536
+
3537
+ return true;
3538
+ }
3539
+
3540
+ function warnInvalidARIAProps(type, props) {
3541
+ {
3542
+ var invalidProps = [];
3543
+
3544
+ for (var key in props) {
3545
+ var isValid = validateProperty(type, key);
3546
+
3547
+ if (!isValid) {
3548
+ invalidProps.push(key);
3549
+ }
3550
+ }
3551
+
3552
+ var unknownPropString = invalidProps.map(function (prop) {
3553
+ return '`' + prop + '`';
3554
+ }).join(', ');
3555
+
3556
+ if (invalidProps.length === 1) {
3557
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
3558
+ } else if (invalidProps.length > 1) {
3559
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
3560
+ }
3561
+ }
3562
+ }
3563
+
3564
+ function validateProperties(type, props) {
3565
+ if (isCustomComponent(type, props)) {
3566
+ return;
3567
+ }
3568
+
3569
+ warnInvalidARIAProps(type, props);
3570
+ }
3571
+
3572
+ var didWarnValueNull = false;
3573
+ function validateProperties$1(type, props) {
3574
+ {
3575
+ if (type !== 'input' && type !== 'textarea' && type !== 'select') {
3576
+ return;
3577
+ }
3578
+
3579
+ if (props != null && props.value === null && !didWarnValueNull) {
3580
+ didWarnValueNull = true;
3581
+
3582
+ if (type === 'select' && props.multiple) {
3583
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
3584
+ } else {
3585
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
3586
+ }
3587
+ }
3588
+ }
3589
+ }
3590
+
3591
+ /**
3592
+ * Mapping from registration name to plugin module
3593
+ */
3594
+
3595
+ var registrationNameModules = {};
3596
+ /**
3597
+ * Mapping from lowercase registration names to the properly cased version,
3598
+ * used to warn in the case of missing event handlers. Available
3599
+ * only in true.
3600
+ * @type {Object}
3601
+ */
3602
+
3603
+ var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
3604
+
3605
+ // When adding attributes to the HTML or SVG whitelist, be sure to
3606
+ // also add them to this module to ensure casing and incorrect name
3607
+ // warnings.
3608
+ var possibleStandardNames = {
3609
+ // HTML
3610
+ accept: 'accept',
3611
+ acceptcharset: 'acceptCharset',
3612
+ 'accept-charset': 'acceptCharset',
3613
+ accesskey: 'accessKey',
3614
+ action: 'action',
3615
+ allowfullscreen: 'allowFullScreen',
3616
+ alt: 'alt',
3617
+ as: 'as',
3618
+ async: 'async',
3619
+ autocapitalize: 'autoCapitalize',
3620
+ autocomplete: 'autoComplete',
3621
+ autocorrect: 'autoCorrect',
3622
+ autofocus: 'autoFocus',
3623
+ autoplay: 'autoPlay',
3624
+ autosave: 'autoSave',
3625
+ capture: 'capture',
3626
+ cellpadding: 'cellPadding',
3627
+ cellspacing: 'cellSpacing',
3628
+ challenge: 'challenge',
3629
+ charset: 'charSet',
3630
+ checked: 'checked',
3631
+ children: 'children',
3632
+ cite: 'cite',
3633
+ class: 'className',
3634
+ classid: 'classID',
3635
+ classname: 'className',
3636
+ cols: 'cols',
3637
+ colspan: 'colSpan',
3638
+ content: 'content',
3639
+ contenteditable: 'contentEditable',
3640
+ contextmenu: 'contextMenu',
3641
+ controls: 'controls',
3642
+ controlslist: 'controlsList',
3643
+ coords: 'coords',
3644
+ crossorigin: 'crossOrigin',
3645
+ dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
3646
+ data: 'data',
3647
+ datetime: 'dateTime',
3648
+ default: 'default',
3649
+ defaultchecked: 'defaultChecked',
3650
+ defaultvalue: 'defaultValue',
3651
+ defer: 'defer',
3652
+ dir: 'dir',
3653
+ disabled: 'disabled',
3654
+ disablepictureinpicture: 'disablePictureInPicture',
3655
+ download: 'download',
3656
+ draggable: 'draggable',
3657
+ enctype: 'encType',
3658
+ for: 'htmlFor',
3659
+ form: 'form',
3660
+ formmethod: 'formMethod',
3661
+ formaction: 'formAction',
3662
+ formenctype: 'formEncType',
3663
+ formnovalidate: 'formNoValidate',
3664
+ formtarget: 'formTarget',
3665
+ frameborder: 'frameBorder',
3666
+ headers: 'headers',
3667
+ height: 'height',
3668
+ hidden: 'hidden',
3669
+ high: 'high',
3670
+ href: 'href',
3671
+ hreflang: 'hrefLang',
3672
+ htmlfor: 'htmlFor',
3673
+ httpequiv: 'httpEquiv',
3674
+ 'http-equiv': 'httpEquiv',
3675
+ icon: 'icon',
3676
+ id: 'id',
3677
+ innerhtml: 'innerHTML',
3678
+ inputmode: 'inputMode',
3679
+ integrity: 'integrity',
3680
+ is: 'is',
3681
+ itemid: 'itemID',
3682
+ itemprop: 'itemProp',
3683
+ itemref: 'itemRef',
3684
+ itemscope: 'itemScope',
3685
+ itemtype: 'itemType',
3686
+ keyparams: 'keyParams',
3687
+ keytype: 'keyType',
3688
+ kind: 'kind',
3689
+ label: 'label',
3690
+ lang: 'lang',
3691
+ list: 'list',
3692
+ loop: 'loop',
3693
+ low: 'low',
3694
+ manifest: 'manifest',
3695
+ marginwidth: 'marginWidth',
3696
+ marginheight: 'marginHeight',
3697
+ max: 'max',
3698
+ maxlength: 'maxLength',
3699
+ media: 'media',
3700
+ mediagroup: 'mediaGroup',
3701
+ method: 'method',
3702
+ min: 'min',
3703
+ minlength: 'minLength',
3704
+ multiple: 'multiple',
3705
+ muted: 'muted',
3706
+ name: 'name',
3707
+ nomodule: 'noModule',
3708
+ nonce: 'nonce',
3709
+ novalidate: 'noValidate',
3710
+ open: 'open',
3711
+ optimum: 'optimum',
3712
+ pattern: 'pattern',
3713
+ placeholder: 'placeholder',
3714
+ playsinline: 'playsInline',
3715
+ poster: 'poster',
3716
+ preload: 'preload',
3717
+ profile: 'profile',
3718
+ radiogroup: 'radioGroup',
3719
+ readonly: 'readOnly',
3720
+ referrerpolicy: 'referrerPolicy',
3721
+ rel: 'rel',
3722
+ required: 'required',
3723
+ reversed: 'reversed',
3724
+ role: 'role',
3725
+ rows: 'rows',
3726
+ rowspan: 'rowSpan',
3727
+ sandbox: 'sandbox',
3728
+ scope: 'scope',
3729
+ scoped: 'scoped',
3730
+ scrolling: 'scrolling',
3731
+ seamless: 'seamless',
3732
+ selected: 'selected',
3733
+ shape: 'shape',
3734
+ size: 'size',
3735
+ sizes: 'sizes',
3736
+ span: 'span',
3737
+ spellcheck: 'spellCheck',
3738
+ src: 'src',
3739
+ srcdoc: 'srcDoc',
3740
+ srclang: 'srcLang',
3741
+ srcset: 'srcSet',
3742
+ start: 'start',
3743
+ step: 'step',
3744
+ style: 'style',
3745
+ summary: 'summary',
3746
+ tabindex: 'tabIndex',
3747
+ target: 'target',
3748
+ title: 'title',
3749
+ type: 'type',
3750
+ usemap: 'useMap',
3751
+ value: 'value',
3752
+ width: 'width',
3753
+ wmode: 'wmode',
3754
+ wrap: 'wrap',
3755
+ // SVG
3756
+ about: 'about',
3757
+ accentheight: 'accentHeight',
3758
+ 'accent-height': 'accentHeight',
3759
+ accumulate: 'accumulate',
3760
+ additive: 'additive',
3761
+ alignmentbaseline: 'alignmentBaseline',
3762
+ 'alignment-baseline': 'alignmentBaseline',
3763
+ allowreorder: 'allowReorder',
3764
+ alphabetic: 'alphabetic',
3765
+ amplitude: 'amplitude',
3766
+ arabicform: 'arabicForm',
3767
+ 'arabic-form': 'arabicForm',
3768
+ ascent: 'ascent',
3769
+ attributename: 'attributeName',
3770
+ attributetype: 'attributeType',
3771
+ autoreverse: 'autoReverse',
3772
+ azimuth: 'azimuth',
3773
+ basefrequency: 'baseFrequency',
3774
+ baselineshift: 'baselineShift',
3775
+ 'baseline-shift': 'baselineShift',
3776
+ baseprofile: 'baseProfile',
3777
+ bbox: 'bbox',
3778
+ begin: 'begin',
3779
+ bias: 'bias',
3780
+ by: 'by',
3781
+ calcmode: 'calcMode',
3782
+ capheight: 'capHeight',
3783
+ 'cap-height': 'capHeight',
3784
+ clip: 'clip',
3785
+ clippath: 'clipPath',
3786
+ 'clip-path': 'clipPath',
3787
+ clippathunits: 'clipPathUnits',
3788
+ cliprule: 'clipRule',
3789
+ 'clip-rule': 'clipRule',
3790
+ color: 'color',
3791
+ colorinterpolation: 'colorInterpolation',
3792
+ 'color-interpolation': 'colorInterpolation',
3793
+ colorinterpolationfilters: 'colorInterpolationFilters',
3794
+ 'color-interpolation-filters': 'colorInterpolationFilters',
3795
+ colorprofile: 'colorProfile',
3796
+ 'color-profile': 'colorProfile',
3797
+ colorrendering: 'colorRendering',
3798
+ 'color-rendering': 'colorRendering',
3799
+ contentscripttype: 'contentScriptType',
3800
+ contentstyletype: 'contentStyleType',
3801
+ cursor: 'cursor',
3802
+ cx: 'cx',
3803
+ cy: 'cy',
3804
+ d: 'd',
3805
+ datatype: 'datatype',
3806
+ decelerate: 'decelerate',
3807
+ descent: 'descent',
3808
+ diffuseconstant: 'diffuseConstant',
3809
+ direction: 'direction',
3810
+ display: 'display',
3811
+ divisor: 'divisor',
3812
+ dominantbaseline: 'dominantBaseline',
3813
+ 'dominant-baseline': 'dominantBaseline',
3814
+ dur: 'dur',
3815
+ dx: 'dx',
3816
+ dy: 'dy',
3817
+ edgemode: 'edgeMode',
3818
+ elevation: 'elevation',
3819
+ enablebackground: 'enableBackground',
3820
+ 'enable-background': 'enableBackground',
3821
+ end: 'end',
3822
+ exponent: 'exponent',
3823
+ externalresourcesrequired: 'externalResourcesRequired',
3824
+ fill: 'fill',
3825
+ fillopacity: 'fillOpacity',
3826
+ 'fill-opacity': 'fillOpacity',
3827
+ fillrule: 'fillRule',
3828
+ 'fill-rule': 'fillRule',
3829
+ filter: 'filter',
3830
+ filterres: 'filterRes',
3831
+ filterunits: 'filterUnits',
3832
+ floodopacity: 'floodOpacity',
3833
+ 'flood-opacity': 'floodOpacity',
3834
+ floodcolor: 'floodColor',
3835
+ 'flood-color': 'floodColor',
3836
+ focusable: 'focusable',
3837
+ fontfamily: 'fontFamily',
3838
+ 'font-family': 'fontFamily',
3839
+ fontsize: 'fontSize',
3840
+ 'font-size': 'fontSize',
3841
+ fontsizeadjust: 'fontSizeAdjust',
3842
+ 'font-size-adjust': 'fontSizeAdjust',
3843
+ fontstretch: 'fontStretch',
3844
+ 'font-stretch': 'fontStretch',
3845
+ fontstyle: 'fontStyle',
3846
+ 'font-style': 'fontStyle',
3847
+ fontvariant: 'fontVariant',
3848
+ 'font-variant': 'fontVariant',
3849
+ fontweight: 'fontWeight',
3850
+ 'font-weight': 'fontWeight',
3851
+ format: 'format',
3852
+ from: 'from',
3853
+ fx: 'fx',
3854
+ fy: 'fy',
3855
+ g1: 'g1',
3856
+ g2: 'g2',
3857
+ glyphname: 'glyphName',
3858
+ 'glyph-name': 'glyphName',
3859
+ glyphorientationhorizontal: 'glyphOrientationHorizontal',
3860
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
3861
+ glyphorientationvertical: 'glyphOrientationVertical',
3862
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
3863
+ glyphref: 'glyphRef',
3864
+ gradienttransform: 'gradientTransform',
3865
+ gradientunits: 'gradientUnits',
3866
+ hanging: 'hanging',
3867
+ horizadvx: 'horizAdvX',
3868
+ 'horiz-adv-x': 'horizAdvX',
3869
+ horizoriginx: 'horizOriginX',
3870
+ 'horiz-origin-x': 'horizOriginX',
3871
+ ideographic: 'ideographic',
3872
+ imagerendering: 'imageRendering',
3873
+ 'image-rendering': 'imageRendering',
3874
+ in2: 'in2',
3875
+ in: 'in',
3876
+ inlist: 'inlist',
3877
+ intercept: 'intercept',
3878
+ k1: 'k1',
3879
+ k2: 'k2',
3880
+ k3: 'k3',
3881
+ k4: 'k4',
3882
+ k: 'k',
3883
+ kernelmatrix: 'kernelMatrix',
3884
+ kernelunitlength: 'kernelUnitLength',
3885
+ kerning: 'kerning',
3886
+ keypoints: 'keyPoints',
3887
+ keysplines: 'keySplines',
3888
+ keytimes: 'keyTimes',
3889
+ lengthadjust: 'lengthAdjust',
3890
+ letterspacing: 'letterSpacing',
3891
+ 'letter-spacing': 'letterSpacing',
3892
+ lightingcolor: 'lightingColor',
3893
+ 'lighting-color': 'lightingColor',
3894
+ limitingconeangle: 'limitingConeAngle',
3895
+ local: 'local',
3896
+ markerend: 'markerEnd',
3897
+ 'marker-end': 'markerEnd',
3898
+ markerheight: 'markerHeight',
3899
+ markermid: 'markerMid',
3900
+ 'marker-mid': 'markerMid',
3901
+ markerstart: 'markerStart',
3902
+ 'marker-start': 'markerStart',
3903
+ markerunits: 'markerUnits',
3904
+ markerwidth: 'markerWidth',
3905
+ mask: 'mask',
3906
+ maskcontentunits: 'maskContentUnits',
3907
+ maskunits: 'maskUnits',
3908
+ mathematical: 'mathematical',
3909
+ mode: 'mode',
3910
+ numoctaves: 'numOctaves',
3911
+ offset: 'offset',
3912
+ opacity: 'opacity',
3913
+ operator: 'operator',
3914
+ order: 'order',
3915
+ orient: 'orient',
3916
+ orientation: 'orientation',
3917
+ origin: 'origin',
3918
+ overflow: 'overflow',
3919
+ overlineposition: 'overlinePosition',
3920
+ 'overline-position': 'overlinePosition',
3921
+ overlinethickness: 'overlineThickness',
3922
+ 'overline-thickness': 'overlineThickness',
3923
+ paintorder: 'paintOrder',
3924
+ 'paint-order': 'paintOrder',
3925
+ panose1: 'panose1',
3926
+ 'panose-1': 'panose1',
3927
+ pathlength: 'pathLength',
3928
+ patterncontentunits: 'patternContentUnits',
3929
+ patterntransform: 'patternTransform',
3930
+ patternunits: 'patternUnits',
3931
+ pointerevents: 'pointerEvents',
3932
+ 'pointer-events': 'pointerEvents',
3933
+ points: 'points',
3934
+ pointsatx: 'pointsAtX',
3935
+ pointsaty: 'pointsAtY',
3936
+ pointsatz: 'pointsAtZ',
3937
+ prefix: 'prefix',
3938
+ preservealpha: 'preserveAlpha',
3939
+ preserveaspectratio: 'preserveAspectRatio',
3940
+ primitiveunits: 'primitiveUnits',
3941
+ property: 'property',
3942
+ r: 'r',
3943
+ radius: 'radius',
3944
+ refx: 'refX',
3945
+ refy: 'refY',
3946
+ renderingintent: 'renderingIntent',
3947
+ 'rendering-intent': 'renderingIntent',
3948
+ repeatcount: 'repeatCount',
3949
+ repeatdur: 'repeatDur',
3950
+ requiredextensions: 'requiredExtensions',
3951
+ requiredfeatures: 'requiredFeatures',
3952
+ resource: 'resource',
3953
+ restart: 'restart',
3954
+ result: 'result',
3955
+ results: 'results',
3956
+ rotate: 'rotate',
3957
+ rx: 'rx',
3958
+ ry: 'ry',
3959
+ scale: 'scale',
3960
+ security: 'security',
3961
+ seed: 'seed',
3962
+ shaperendering: 'shapeRendering',
3963
+ 'shape-rendering': 'shapeRendering',
3964
+ slope: 'slope',
3965
+ spacing: 'spacing',
3966
+ specularconstant: 'specularConstant',
3967
+ specularexponent: 'specularExponent',
3968
+ speed: 'speed',
3969
+ spreadmethod: 'spreadMethod',
3970
+ startoffset: 'startOffset',
3971
+ stddeviation: 'stdDeviation',
3972
+ stemh: 'stemh',
3973
+ stemv: 'stemv',
3974
+ stitchtiles: 'stitchTiles',
3975
+ stopcolor: 'stopColor',
3976
+ 'stop-color': 'stopColor',
3977
+ stopopacity: 'stopOpacity',
3978
+ 'stop-opacity': 'stopOpacity',
3979
+ strikethroughposition: 'strikethroughPosition',
3980
+ 'strikethrough-position': 'strikethroughPosition',
3981
+ strikethroughthickness: 'strikethroughThickness',
3982
+ 'strikethrough-thickness': 'strikethroughThickness',
3983
+ string: 'string',
3984
+ stroke: 'stroke',
3985
+ strokedasharray: 'strokeDasharray',
3986
+ 'stroke-dasharray': 'strokeDasharray',
3987
+ strokedashoffset: 'strokeDashoffset',
3988
+ 'stroke-dashoffset': 'strokeDashoffset',
3989
+ strokelinecap: 'strokeLinecap',
3990
+ 'stroke-linecap': 'strokeLinecap',
3991
+ strokelinejoin: 'strokeLinejoin',
3992
+ 'stroke-linejoin': 'strokeLinejoin',
3993
+ strokemiterlimit: 'strokeMiterlimit',
3994
+ 'stroke-miterlimit': 'strokeMiterlimit',
3995
+ strokewidth: 'strokeWidth',
3996
+ 'stroke-width': 'strokeWidth',
3997
+ strokeopacity: 'strokeOpacity',
3998
+ 'stroke-opacity': 'strokeOpacity',
3999
+ suppresscontenteditablewarning: 'suppressContentEditableWarning',
4000
+ suppresshydrationwarning: 'suppressHydrationWarning',
4001
+ surfacescale: 'surfaceScale',
4002
+ systemlanguage: 'systemLanguage',
4003
+ tablevalues: 'tableValues',
4004
+ targetx: 'targetX',
4005
+ targety: 'targetY',
4006
+ textanchor: 'textAnchor',
4007
+ 'text-anchor': 'textAnchor',
4008
+ textdecoration: 'textDecoration',
4009
+ 'text-decoration': 'textDecoration',
4010
+ textlength: 'textLength',
4011
+ textrendering: 'textRendering',
4012
+ 'text-rendering': 'textRendering',
4013
+ to: 'to',
4014
+ transform: 'transform',
4015
+ typeof: 'typeof',
4016
+ u1: 'u1',
4017
+ u2: 'u2',
4018
+ underlineposition: 'underlinePosition',
4019
+ 'underline-position': 'underlinePosition',
4020
+ underlinethickness: 'underlineThickness',
4021
+ 'underline-thickness': 'underlineThickness',
4022
+ unicode: 'unicode',
4023
+ unicodebidi: 'unicodeBidi',
4024
+ 'unicode-bidi': 'unicodeBidi',
4025
+ unicoderange: 'unicodeRange',
4026
+ 'unicode-range': 'unicodeRange',
4027
+ unitsperem: 'unitsPerEm',
4028
+ 'units-per-em': 'unitsPerEm',
4029
+ unselectable: 'unselectable',
4030
+ valphabetic: 'vAlphabetic',
4031
+ 'v-alphabetic': 'vAlphabetic',
4032
+ values: 'values',
4033
+ vectoreffect: 'vectorEffect',
4034
+ 'vector-effect': 'vectorEffect',
4035
+ version: 'version',
4036
+ vertadvy: 'vertAdvY',
4037
+ 'vert-adv-y': 'vertAdvY',
4038
+ vertoriginx: 'vertOriginX',
4039
+ 'vert-origin-x': 'vertOriginX',
4040
+ vertoriginy: 'vertOriginY',
4041
+ 'vert-origin-y': 'vertOriginY',
4042
+ vhanging: 'vHanging',
4043
+ 'v-hanging': 'vHanging',
4044
+ videographic: 'vIdeographic',
4045
+ 'v-ideographic': 'vIdeographic',
4046
+ viewbox: 'viewBox',
4047
+ viewtarget: 'viewTarget',
4048
+ visibility: 'visibility',
4049
+ vmathematical: 'vMathematical',
4050
+ 'v-mathematical': 'vMathematical',
4051
+ vocab: 'vocab',
4052
+ widths: 'widths',
4053
+ wordspacing: 'wordSpacing',
4054
+ 'word-spacing': 'wordSpacing',
4055
+ writingmode: 'writingMode',
4056
+ 'writing-mode': 'writingMode',
4057
+ x1: 'x1',
4058
+ x2: 'x2',
4059
+ x: 'x',
4060
+ xchannelselector: 'xChannelSelector',
4061
+ xheight: 'xHeight',
4062
+ 'x-height': 'xHeight',
4063
+ xlinkactuate: 'xlinkActuate',
4064
+ 'xlink:actuate': 'xlinkActuate',
4065
+ xlinkarcrole: 'xlinkArcrole',
4066
+ 'xlink:arcrole': 'xlinkArcrole',
4067
+ xlinkhref: 'xlinkHref',
4068
+ 'xlink:href': 'xlinkHref',
4069
+ xlinkrole: 'xlinkRole',
4070
+ 'xlink:role': 'xlinkRole',
4071
+ xlinkshow: 'xlinkShow',
4072
+ 'xlink:show': 'xlinkShow',
4073
+ xlinktitle: 'xlinkTitle',
4074
+ 'xlink:title': 'xlinkTitle',
4075
+ xlinktype: 'xlinkType',
4076
+ 'xlink:type': 'xlinkType',
4077
+ xmlbase: 'xmlBase',
4078
+ 'xml:base': 'xmlBase',
4079
+ xmllang: 'xmlLang',
4080
+ 'xml:lang': 'xmlLang',
4081
+ xmlns: 'xmlns',
4082
+ 'xml:space': 'xmlSpace',
4083
+ xmlnsxlink: 'xmlnsXlink',
4084
+ 'xmlns:xlink': 'xmlnsXlink',
4085
+ xmlspace: 'xmlSpace',
4086
+ y1: 'y1',
4087
+ y2: 'y2',
4088
+ y: 'y',
4089
+ ychannelselector: 'yChannelSelector',
4090
+ z: 'z',
4091
+ zoomandpan: 'zoomAndPan'
4092
+ };
4093
+
4094
+ var validateProperty$1 = function () {};
4095
+
4096
+ {
4097
+ var warnedProperties$1 = {};
4098
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
4099
+ var EVENT_NAME_REGEX = /^on./;
4100
+ var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
4101
+ var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
4102
+ var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
4103
+
4104
+ validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
4105
+ if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
4106
+ return true;
4107
+ }
4108
+
4109
+ var lowerCasedName = name.toLowerCase();
4110
+
4111
+ if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
4112
+ error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
4113
+
4114
+ warnedProperties$1[name] = true;
4115
+ return true;
4116
+ } // We can't rely on the event system being injected on the server.
4117
+
4118
+
4119
+ if (canUseEventSystem) {
4120
+ if (registrationNameModules.hasOwnProperty(name)) {
4121
+ return true;
4122
+ }
4123
+
4124
+ var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
4125
+
4126
+ if (registrationName != null) {
4127
+ error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
4128
+
4129
+ warnedProperties$1[name] = true;
4130
+ return true;
4131
+ }
4132
+
4133
+ if (EVENT_NAME_REGEX.test(name)) {
4134
+ error('Unknown event handler property `%s`. It will be ignored.', name);
4135
+
4136
+ warnedProperties$1[name] = true;
4137
+ return true;
4138
+ }
4139
+ } else if (EVENT_NAME_REGEX.test(name)) {
4140
+ // If no event plugins have been injected, we are in a server environment.
4141
+ // So we can't tell if the event name is correct for sure, but we can filter
4142
+ // out known bad ones like `onclick`. We can't suggest a specific replacement though.
4143
+ if (INVALID_EVENT_NAME_REGEX.test(name)) {
4144
+ error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
4145
+ }
4146
+
4147
+ warnedProperties$1[name] = true;
4148
+ return true;
4149
+ } // Let the ARIA attribute hook validate ARIA attributes
4150
+
4151
+
4152
+ if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
4153
+ return true;
4154
+ }
4155
+
4156
+ if (lowerCasedName === 'innerhtml') {
4157
+ error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
4158
+
4159
+ warnedProperties$1[name] = true;
4160
+ return true;
4161
+ }
4162
+
4163
+ if (lowerCasedName === 'aria') {
4164
+ error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
4165
+
4166
+ warnedProperties$1[name] = true;
4167
+ return true;
4168
+ }
4169
+
4170
+ if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
4171
+ error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
4172
+
4173
+ warnedProperties$1[name] = true;
4174
+ return true;
4175
+ }
4176
+
4177
+ if (typeof value === 'number' && isNaN(value)) {
4178
+ error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
4179
+
4180
+ warnedProperties$1[name] = true;
4181
+ return true;
4182
+ }
4183
+
4184
+ var propertyInfo = getPropertyInfo(name);
4185
+ var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
4186
+
4187
+ if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
4188
+ var standardName = possibleStandardNames[lowerCasedName];
4189
+
4190
+ if (standardName !== name) {
4191
+ error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
4192
+
4193
+ warnedProperties$1[name] = true;
4194
+ return true;
4195
+ }
4196
+ } else if (!isReserved && name !== lowerCasedName) {
4197
+ // Unknown attributes should have lowercase casing since that's how they
4198
+ // will be cased anyway with server rendering.
4199
+ error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
4200
+
4201
+ warnedProperties$1[name] = true;
4202
+ return true;
4203
+ }
4204
+
4205
+ if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
4206
+ if (value) {
4207
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
4208
+ } else {
4209
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
4210
+ }
4211
+
4212
+ warnedProperties$1[name] = true;
4213
+ return true;
4214
+ } // Now that we've validated casing, do not validate
4215
+ // data types for reserved props
4216
+
4217
+
4218
+ if (isReserved) {
4219
+ return true;
4220
+ } // Warn when a known attribute is a bad type
4221
+
4222
+
4223
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
4224
+ warnedProperties$1[name] = true;
4225
+ return false;
4226
+ } // Warn when passing the strings 'false' or 'true' into a boolean prop
4227
+
4228
+
4229
+ if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
4230
+ error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
4231
+
4232
+ warnedProperties$1[name] = true;
4233
+ return true;
4234
+ }
4235
+
4236
+ return true;
4237
+ };
4238
+ }
4239
+
4240
+ var warnUnknownProperties = function (type, props, canUseEventSystem) {
4241
+ {
4242
+ var unknownProps = [];
4243
+
4244
+ for (var key in props) {
4245
+ var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
4246
+
4247
+ if (!isValid) {
4248
+ unknownProps.push(key);
4249
+ }
4250
+ }
4251
+
4252
+ var unknownPropString = unknownProps.map(function (prop) {
4253
+ return '`' + prop + '`';
4254
+ }).join(', ');
4255
+
4256
+ if (unknownProps.length === 1) {
4257
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
4258
+ } else if (unknownProps.length > 1) {
4259
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
4260
+ }
4261
+ }
4262
+ };
4263
+
4264
+ function validateProperties$2(type, props, canUseEventSystem) {
4265
+ if (isCustomComponent(type, props)) {
4266
+ return;
4267
+ }
4268
+
4269
+ warnUnknownProperties(type, props, canUseEventSystem);
4270
+ }
4271
+
4272
+ var toArray = React$1.Children.toArray; // This is only used in DEV.
4273
+ // Each entry is `this.stack` from a currently executing renderer instance.
4274
+ // (There may be more than one because ReactDOMServer is reentrant).
4275
+ // Each stack is an array of frames which may contain nested stacks of elements.
4276
+
4277
+ var currentDebugStacks = [];
4278
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
4279
+ var ReactDebugCurrentFrame$4;
4280
+ var prevGetCurrentStackImpl = null;
4281
+
4282
+ var getCurrentServerStackImpl = function () {
4283
+ return '';
4284
+ };
4285
+
4286
+ var describeStackFrame = function (element) {
4287
+ return '';
4288
+ };
4289
+
4290
+ var validatePropertiesInDevelopment = function (type, props) {};
4291
+
4292
+ var pushCurrentDebugStack = function (stack) {};
4293
+
4294
+ var pushElementToDebugStack = function (element) {};
4295
+
4296
+ var popCurrentDebugStack = function () {};
4297
+
4298
+ var hasWarnedAboutUsingContextAsConsumer = false;
4299
+
4300
+ {
4301
+ ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame;
4302
+
4303
+ validatePropertiesInDevelopment = function (type, props) {
4304
+ validateProperties(type, props);
4305
+ validateProperties$1(type, props);
4306
+ validateProperties$2(type, props,
4307
+ /* canUseEventSystem */
4308
+ false);
4309
+ };
4310
+
4311
+ describeStackFrame = function (element) {
4312
+ var source = element._source;
4313
+ var type = element.type;
4314
+ var name = getComponentName(type);
4315
+ return describeComponentFrame(name, source);
4316
+ };
4317
+
4318
+ pushCurrentDebugStack = function (stack) {
4319
+ currentDebugStacks.push(stack);
4320
+
4321
+ if (currentDebugStacks.length === 1) {
4322
+ // We are entering a server renderer.
4323
+ // Remember the previous (e.g. client) global stack implementation.
4324
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$4.getCurrentStack;
4325
+ ReactDebugCurrentFrame$4.getCurrentStack = getCurrentServerStackImpl;
4326
+ }
4327
+ };
4328
+
4329
+ pushElementToDebugStack = function (element) {
4330
+ // For the innermost executing ReactDOMServer call,
4331
+ var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>),
4332
+
4333
+ var frame = stack[stack.length - 1]; // and record that it has one more element associated with it.
4334
+
4335
+ frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element
4336
+ // children and directly handle them in an inner loop instead of
4337
+ // creating separate frames for them.
4338
+ };
4339
+
4340
+ popCurrentDebugStack = function () {
4341
+ currentDebugStacks.pop();
4342
+
4343
+ if (currentDebugStacks.length === 0) {
4344
+ // We are exiting the server renderer.
4345
+ // Restore the previous (e.g. client) global stack implementation.
4346
+ ReactDebugCurrentFrame$4.getCurrentStack = prevGetCurrentStackImpl;
4347
+ prevGetCurrentStackImpl = null;
4348
+ }
4349
+ };
4350
+
4351
+ getCurrentServerStackImpl = function () {
4352
+ if (currentDebugStacks.length === 0) {
4353
+ // Nothing is currently rendering.
4354
+ return '';
4355
+ } // ReactDOMServer is reentrant so there may be multiple calls at the same time.
4356
+ // Take the frames from the innermost call which is the last in the array.
4357
+
4358
+
4359
+ var frames = currentDebugStacks[currentDebugStacks.length - 1];
4360
+ var stack = ''; // Go through every frame in the stack from the innermost one.
4361
+
4362
+ for (var i = frames.length - 1; i >= 0; i--) {
4363
+ var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it.
4364
+ // This is because single-child nesting doesn't create materialized frames.
4365
+ // Instead it would push them through `pushElementToDebugStack()`.
4366
+
4367
+ var debugElementStack = frame.debugElementStack;
4368
+
4369
+ for (var ii = debugElementStack.length - 1; ii >= 0; ii--) {
4370
+ stack += describeStackFrame(debugElementStack[ii]);
4371
+ }
4372
+ }
4373
+
4374
+ return stack;
4375
+ };
4376
+ }
4377
+
4378
+ var didWarnDefaultInputValue = false;
4379
+ var didWarnDefaultChecked = false;
4380
+ var didWarnDefaultSelectValue = false;
4381
+ var didWarnDefaultTextareaValue = false;
4382
+ var didWarnInvalidOptionChildren = false;
4383
+ var didWarnAboutNoopUpdateForComponent = {};
4384
+ var didWarnAboutBadClass = {};
4385
+ var didWarnAboutModulePatternComponent = {};
4386
+ var didWarnAboutDeprecatedWillMount = {};
4387
+ var didWarnAboutUndefinedDerivedState = {};
4388
+ var didWarnAboutUninitializedState = {};
4389
+ var valuePropNames = ['value', 'defaultValue'];
4390
+ var newlineEatingTags = {
4391
+ listing: true,
4392
+ pre: true,
4393
+ textarea: true
4394
+ }; // We accept any tag to be rendered but since this gets injected into arbitrary
4395
+ // HTML, we want to make sure that it's a safe tag.
4396
+ // http://www.w3.org/TR/REC-xml/#NT-Name
4397
+
4398
+ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
4399
+
4400
+ var validatedTagCache = {};
4401
+
4402
+ function validateDangerousTag(tag) {
4403
+ if (!validatedTagCache.hasOwnProperty(tag)) {
4404
+ if (!VALID_TAG_REGEX.test(tag)) {
4405
+ {
4406
+ throw Error( "Invalid tag: " + tag );
4407
+ }
4408
+ }
4409
+
4410
+ validatedTagCache[tag] = true;
4411
+ }
4412
+ }
4413
+
4414
+ var styleNameCache = {};
4415
+
4416
+ var processStyleName = function (styleName) {
4417
+ if (styleNameCache.hasOwnProperty(styleName)) {
4418
+ return styleNameCache[styleName];
4419
+ }
4420
+
4421
+ var result = hyphenateStyleName(styleName);
4422
+ styleNameCache[styleName] = result;
4423
+ return result;
4424
+ };
4425
+
4426
+ function createMarkupForStyles(styles) {
4427
+ var serialized = '';
4428
+ var delimiter = '';
4429
+
4430
+ for (var styleName in styles) {
4431
+ if (!styles.hasOwnProperty(styleName)) {
4432
+ continue;
4433
+ }
4434
+
4435
+ var isCustomProperty = styleName.indexOf('--') === 0;
4436
+ var styleValue = styles[styleName];
4437
+
4438
+ {
4439
+ if (!isCustomProperty) {
4440
+ warnValidStyle$1(styleName, styleValue);
4441
+ }
4442
+ }
4443
+
4444
+ if (styleValue != null) {
4445
+ serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
4446
+ serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
4447
+ delimiter = ';';
4448
+ }
4449
+ }
4450
+
4451
+ return serialized || null;
4452
+ }
4453
+
4454
+ function warnNoop(publicInstance, callerName) {
4455
+ {
4456
+ var _constructor = publicInstance.constructor;
4457
+ var componentName = _constructor && getComponentName(_constructor) || 'ReactClass';
4458
+ var warningKey = componentName + '.' + callerName;
4459
+
4460
+ if (didWarnAboutNoopUpdateForComponent[warningKey]) {
4461
+ return;
4462
+ }
4463
+
4464
+ error('%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
4465
+
4466
+ didWarnAboutNoopUpdateForComponent[warningKey] = true;
4467
+ }
4468
+ }
4469
+
4470
+ function shouldConstruct(Component) {
4471
+ return Component.prototype && Component.prototype.isReactComponent;
4472
+ }
4473
+
4474
+ function getNonChildrenInnerMarkup(props) {
4475
+ var innerHTML = props.dangerouslySetInnerHTML;
4476
+
4477
+ if (innerHTML != null) {
4478
+ if (innerHTML.__html != null) {
4479
+ return innerHTML.__html;
4480
+ }
4481
+ } else {
4482
+ var content = props.children;
4483
+
4484
+ if (typeof content === 'string' || typeof content === 'number') {
4485
+ return escapeTextForBrowser(content);
4486
+ }
4487
+ }
4488
+
4489
+ return null;
4490
+ }
4491
+
4492
+ function flattenTopLevelChildren(children) {
4493
+ if (!React$1.isValidElement(children)) {
4494
+ return toArray(children);
4495
+ }
4496
+
4497
+ var element = children;
4498
+
4499
+ if (element.type !== REACT_FRAGMENT_TYPE) {
4500
+ return [element];
4501
+ }
4502
+
4503
+ var fragmentChildren = element.props.children;
4504
+
4505
+ if (!React$1.isValidElement(fragmentChildren)) {
4506
+ return toArray(fragmentChildren);
4507
+ }
4508
+
4509
+ var fragmentChildElement = fragmentChildren;
4510
+ return [fragmentChildElement];
4511
+ }
4512
+
4513
+ function flattenOptionChildren(children) {
4514
+ if (children === undefined || children === null) {
4515
+ return children;
4516
+ }
4517
+
4518
+ var content = ''; // Flatten children and warn if they aren't strings or numbers;
4519
+ // invalid types are ignored.
4520
+
4521
+ React$1.Children.forEach(children, function (child) {
4522
+ if (child == null) {
4523
+ return;
4524
+ }
4525
+
4526
+ content += child;
4527
+
4528
+ {
4529
+ if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
4530
+ didWarnInvalidOptionChildren = true;
4531
+
4532
+ error('Only strings and numbers are supported as <option> children.');
4533
+ }
4534
+ }
4535
+ });
4536
+ return content;
4537
+ }
4538
+
4539
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
4540
+ var STYLE = 'style';
4541
+ var RESERVED_PROPS = {
4542
+ children: null,
4543
+ dangerouslySetInnerHTML: null,
4544
+ suppressContentEditableWarning: null,
4545
+ suppressHydrationWarning: null
4546
+ };
4547
+
4548
+ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
4549
+ var ret = '<' + tagVerbatim;
4550
+
4551
+ for (var propKey in props) {
4552
+ if (!hasOwnProperty$2.call(props, propKey)) {
4553
+ continue;
4554
+ }
4555
+
4556
+ var propValue = props[propKey];
4557
+
4558
+ if (propValue == null) {
4559
+ continue;
4560
+ }
4561
+
4562
+ if (propKey === STYLE) {
4563
+ propValue = createMarkupForStyles(propValue);
4564
+ }
4565
+
4566
+ var markup = null;
4567
+
4568
+ if (isCustomComponent(tagLowercase, props)) {
4569
+ if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
4570
+ markup = createMarkupForCustomAttribute(propKey, propValue);
4571
+ }
4572
+ } else {
4573
+ markup = createMarkupForProperty(propKey, propValue);
4574
+ }
4575
+
4576
+ if (markup) {
4577
+ ret += ' ' + markup;
4578
+ }
4579
+ } // For static pages, no need to put React ID and checksum. Saves lots of
4580
+ // bytes.
4581
+
4582
+
4583
+ if (makeStaticMarkup) {
4584
+ return ret;
4585
+ }
4586
+
4587
+ if (isRootElement) {
4588
+ ret += ' ' + createMarkupForRoot();
4589
+ }
4590
+
4591
+ return ret;
4592
+ }
4593
+
4594
+ function validateRenderResult(child, type) {
4595
+ if (child === undefined) {
4596
+ {
4597
+ {
4598
+ throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
4599
+ }
4600
+ }
4601
+ }
4602
+ }
4603
+
4604
+ function resolve(child, context, threadID) {
4605
+ while (React$1.isValidElement(child)) {
4606
+ // Safe because we just checked it's an element.
4607
+ var element = child;
4608
+ var Component = element.type;
4609
+
4610
+ {
4611
+ pushElementToDebugStack(element);
4612
+ }
4613
+
4614
+ if (typeof Component !== 'function') {
4615
+ break;
4616
+ }
4617
+
4618
+ processChild(element, Component);
4619
+ } // Extra closure so queue and replace can be captured properly
4620
+
4621
+
4622
+ function processChild(element, Component) {
4623
+ var isClass = shouldConstruct(Component);
4624
+ var publicContext = processContext(Component, context, threadID, isClass);
4625
+ var queue = [];
4626
+ var replace = false;
4627
+ var updater = {
4628
+ isMounted: function (publicInstance) {
4629
+ return false;
4630
+ },
4631
+ enqueueForceUpdate: function (publicInstance) {
4632
+ if (queue === null) {
4633
+ warnNoop(publicInstance, 'forceUpdate');
4634
+ return null;
4635
+ }
4636
+ },
4637
+ enqueueReplaceState: function (publicInstance, completeState) {
4638
+ replace = true;
4639
+ queue = [completeState];
4640
+ },
4641
+ enqueueSetState: function (publicInstance, currentPartialState) {
4642
+ if (queue === null) {
4643
+ warnNoop(publicInstance, 'setState');
4644
+ return null;
4645
+ }
4646
+
4647
+ queue.push(currentPartialState);
4648
+ }
4649
+ };
4650
+ var inst;
4651
+
4652
+ if (isClass) {
4653
+ inst = new Component(element.props, publicContext, updater);
4654
+
4655
+ if (typeof Component.getDerivedStateFromProps === 'function') {
4656
+ {
4657
+ if (inst.state === null || inst.state === undefined) {
4658
+ var componentName = getComponentName(Component) || 'Unknown';
4659
+
4660
+ if (!didWarnAboutUninitializedState[componentName]) {
4661
+ error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, inst.state === null ? 'null' : 'undefined', componentName);
4662
+
4663
+ didWarnAboutUninitializedState[componentName] = true;
4664
+ }
4665
+ }
4666
+ }
4667
+
4668
+ var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state);
4669
+
4670
+ {
4671
+ if (partialState === undefined) {
4672
+ var _componentName = getComponentName(Component) || 'Unknown';
4673
+
4674
+ if (!didWarnAboutUndefinedDerivedState[_componentName]) {
4675
+ error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
4676
+
4677
+ didWarnAboutUndefinedDerivedState[_componentName] = true;
4678
+ }
4679
+ }
4680
+ }
4681
+
4682
+ if (partialState != null) {
4683
+ inst.state = _assign({}, inst.state, partialState);
4684
+ }
4685
+ }
4686
+ } else {
4687
+ {
4688
+ if (Component.prototype && typeof Component.prototype.render === 'function') {
4689
+ var _componentName2 = getComponentName(Component) || 'Unknown';
4690
+
4691
+ if (!didWarnAboutBadClass[_componentName2]) {
4692
+ error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', _componentName2, _componentName2);
4693
+
4694
+ didWarnAboutBadClass[_componentName2] = true;
4695
+ }
4696
+ }
4697
+ }
4698
+
4699
+ var componentIdentity = {};
4700
+ prepareToUseHooks(componentIdentity);
4701
+ inst = Component(element.props, publicContext, updater);
4702
+ inst = finishHooks(Component, element.props, inst, publicContext);
4703
+
4704
+ if (inst == null || inst.render == null) {
4705
+ child = inst;
4706
+ validateRenderResult(child, Component);
4707
+ return;
4708
+ }
4709
+
4710
+ {
4711
+ var _componentName3 = getComponentName(Component) || 'Unknown';
4712
+
4713
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
4714
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
4715
+
4716
+ didWarnAboutModulePatternComponent[_componentName3] = true;
4717
+ }
4718
+ }
4719
+ }
4720
+
4721
+ inst.props = element.props;
4722
+ inst.context = publicContext;
4723
+ inst.updater = updater;
4724
+ var initialState = inst.state;
4725
+
4726
+ if (initialState === undefined) {
4727
+ inst.state = initialState = null;
4728
+ }
4729
+
4730
+ if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
4731
+ if (typeof inst.componentWillMount === 'function') {
4732
+ {
4733
+ if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
4734
+ var _componentName4 = getComponentName(Component) || 'Unknown';
4735
+
4736
+ if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
4737
+ warn( // keep this warning in sync with ReactStrictModeWarning.js
4738
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
4739
+
4740
+ didWarnAboutDeprecatedWillMount[_componentName4] = true;
4741
+ }
4742
+ }
4743
+ } // In order to support react-lifecycles-compat polyfilled components,
4744
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
4745
+
4746
+
4747
+ if (typeof Component.getDerivedStateFromProps !== 'function') {
4748
+ inst.componentWillMount();
4749
+ }
4750
+ }
4751
+
4752
+ if (typeof inst.UNSAFE_componentWillMount === 'function' && typeof Component.getDerivedStateFromProps !== 'function') {
4753
+ // In order to support react-lifecycles-compat polyfilled components,
4754
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
4755
+ inst.UNSAFE_componentWillMount();
4756
+ }
4757
+
4758
+ if (queue.length) {
4759
+ var oldQueue = queue;
4760
+ var oldReplace = replace;
4761
+ queue = null;
4762
+ replace = false;
4763
+
4764
+ if (oldReplace && oldQueue.length === 1) {
4765
+ inst.state = oldQueue[0];
4766
+ } else {
4767
+ var nextState = oldReplace ? oldQueue[0] : inst.state;
4768
+ var dontMutate = true;
4769
+
4770
+ for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
4771
+ var partial = oldQueue[i];
4772
+
4773
+ var _partialState = typeof partial === 'function' ? partial.call(inst, nextState, element.props, publicContext) : partial;
4774
+
4775
+ if (_partialState != null) {
4776
+ if (dontMutate) {
4777
+ dontMutate = false;
4778
+ nextState = _assign({}, nextState, _partialState);
4779
+ } else {
4780
+ _assign(nextState, _partialState);
4781
+ }
4782
+ }
4783
+ }
4784
+
4785
+ inst.state = nextState;
4786
+ }
4787
+ } else {
4788
+ queue = null;
4789
+ }
4790
+ }
4791
+
4792
+ child = inst.render();
4793
+
4794
+ {
4795
+ if (child === undefined && inst.render._isMockFunction) {
4796
+ // This is probably bad practice. Consider warning here and
4797
+ // deprecating this convenience.
4798
+ child = null;
4799
+ }
4800
+ }
4801
+
4802
+ validateRenderResult(child, Component);
4803
+ var childContext;
4804
+
4805
+ {
4806
+ if (typeof inst.getChildContext === 'function') {
4807
+ var _childContextTypes = Component.childContextTypes;
4808
+
4809
+ if (typeof _childContextTypes === 'object') {
4810
+ childContext = inst.getChildContext();
4811
+
4812
+ for (var contextKey in childContext) {
4813
+ if (!(contextKey in _childContextTypes)) {
4814
+ {
4815
+ throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
4816
+ }
4817
+ }
4818
+ }
4819
+ } else {
4820
+ {
4821
+ error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
4822
+ }
4823
+ }
4824
+ }
4825
+
4826
+ if (childContext) {
4827
+ context = _assign({}, context, childContext);
4828
+ }
4829
+ }
4830
+ }
4831
+
4832
+ return {
4833
+ child: child,
4834
+ context: context
4835
+ };
4836
+ }
4837
+
4838
+ var ReactDOMServerRenderer =
4839
+ /*#__PURE__*/
4840
+ function () {
4841
+ // TODO: type this more strictly:
4842
+ // DEV-only
4843
+ function ReactDOMServerRenderer(children, makeStaticMarkup) {
4844
+ var flatChildren = flattenTopLevelChildren(children);
4845
+ var topFrame = {
4846
+ type: null,
4847
+ // Assume all trees start in the HTML namespace (not totally true, but
4848
+ // this is what we did historically)
4849
+ domNamespace: Namespaces.html,
4850
+ children: flatChildren,
4851
+ childIndex: 0,
4852
+ context: emptyObject,
4853
+ footer: ''
4854
+ };
4855
+
4856
+ {
4857
+ topFrame.debugElementStack = [];
4858
+ }
4859
+
4860
+ this.threadID = allocThreadID();
4861
+ this.stack = [topFrame];
4862
+ this.exhausted = false;
4863
+ this.currentSelectValue = null;
4864
+ this.previousWasTextNode = false;
4865
+ this.makeStaticMarkup = makeStaticMarkup;
4866
+ this.suspenseDepth = 0; // Context (new API)
4867
+
4868
+ this.contextIndex = -1;
4869
+ this.contextStack = [];
4870
+ this.contextValueStack = [];
4871
+
4872
+ {
4873
+ this.contextProviderStack = [];
4874
+ }
4875
+ }
4876
+
4877
+ var _proto = ReactDOMServerRenderer.prototype;
4878
+
4879
+ _proto.destroy = function destroy() {
4880
+ if (!this.exhausted) {
4881
+ this.exhausted = true;
4882
+ this.clearProviders();
4883
+ freeThreadID(this.threadID);
4884
+ }
4885
+ }
4886
+ /**
4887
+ * Note: We use just two stacks regardless of how many context providers you have.
4888
+ * Providers are always popped in the reverse order to how they were pushed
4889
+ * so we always know on the way down which provider you'll encounter next on the way up.
4890
+ * On the way down, we push the current provider, and its context value *before*
4891
+ * we mutated it, onto the stacks. Therefore, on the way up, we always know which
4892
+ * provider needs to be "restored" to which value.
4893
+ * https://github.com/facebook/react/pull/12985#issuecomment-396301248
4894
+ */
4895
+ ;
4896
+
4897
+ _proto.pushProvider = function pushProvider(provider) {
4898
+ var index = ++this.contextIndex;
4899
+ var context = provider.type._context;
4900
+ var threadID = this.threadID;
4901
+ validateContextBounds(context, threadID);
4902
+ var previousValue = context[threadID]; // Remember which value to restore this context to on our way up.
4903
+
4904
+ this.contextStack[index] = context;
4905
+ this.contextValueStack[index] = previousValue;
4906
+
4907
+ {
4908
+ // Only used for push/pop mismatch warnings.
4909
+ this.contextProviderStack[index] = provider;
4910
+ } // Mutate the current value.
4911
+
4912
+
4913
+ context[threadID] = provider.props.value;
4914
+ };
4915
+
4916
+ _proto.popProvider = function popProvider(provider) {
4917
+ var index = this.contextIndex;
4918
+
4919
+ {
4920
+ if (index < 0 || provider !== this.contextProviderStack[index]) {
4921
+ error('Unexpected pop.');
4922
+ }
4923
+ }
4924
+
4925
+ var context = this.contextStack[index];
4926
+ var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any`
4927
+ // because conceptually they are deletions--as long as we
4928
+ // promise to never access values beyond `this.contextIndex`.
4929
+
4930
+ this.contextStack[index] = null;
4931
+ this.contextValueStack[index] = null;
4932
+
4933
+ {
4934
+ this.contextProviderStack[index] = null;
4935
+ }
4936
+
4937
+ this.contextIndex--; // Restore to the previous value we stored as we were walking down.
4938
+ // We've already verified that this context has been expanded to accommodate
4939
+ // this thread id, so we don't need to do it again.
4940
+
4941
+ context[this.threadID] = previousValue;
4942
+ };
4943
+
4944
+ _proto.clearProviders = function clearProviders() {
4945
+ // Restore any remaining providers on the stack to previous values
4946
+ for (var index = this.contextIndex; index >= 0; index--) {
4947
+ var context = this.contextStack[index];
4948
+ var previousValue = this.contextValueStack[index];
4949
+ context[this.threadID] = previousValue;
4950
+ }
4951
+ };
4952
+
4953
+ _proto.read = function read(bytes) {
4954
+ if (this.exhausted) {
4955
+ return null;
4956
+ }
4957
+
4958
+ var prevThreadID = currentThreadID;
4959
+ setCurrentThreadID(this.threadID);
4960
+ var prevDispatcher = ReactCurrentDispatcher.current;
4961
+ ReactCurrentDispatcher.current = Dispatcher;
4962
+
4963
+ try {
4964
+ // Markup generated within <Suspense> ends up buffered until we know
4965
+ // nothing in that boundary suspended
4966
+ var out = [''];
4967
+ var suspended = false;
4968
+
4969
+ while (out[0].length < bytes) {
4970
+ if (this.stack.length === 0) {
4971
+ this.exhausted = true;
4972
+ freeThreadID(this.threadID);
4973
+ break;
4974
+ }
4975
+
4976
+ var frame = this.stack[this.stack.length - 1];
4977
+
4978
+ if (suspended || frame.childIndex >= frame.children.length) {
4979
+ var footer = frame.footer;
4980
+
4981
+ if (footer !== '') {
4982
+ this.previousWasTextNode = false;
4983
+ }
4984
+
4985
+ this.stack.pop();
4986
+
4987
+ if (frame.type === 'select') {
4988
+ this.currentSelectValue = null;
4989
+ } else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
4990
+ var provider = frame.type;
4991
+ this.popProvider(provider);
4992
+ } else if (frame.type === REACT_SUSPENSE_TYPE) {
4993
+ this.suspenseDepth--;
4994
+ var buffered = out.pop();
4995
+
4996
+ if (suspended) {
4997
+ suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame
4998
+
4999
+ var fallbackFrame = frame.fallbackFrame;
5000
+
5001
+ if (!fallbackFrame) {
5002
+ {
5003
+ throw Error(true ? "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue." : formatProdErrorMessage(303));
5004
+ }
5005
+ }
5006
+
5007
+ this.stack.push(fallbackFrame);
5008
+ out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
5009
+
5010
+ continue;
5011
+ } else {
5012
+ out[this.suspenseDepth] += buffered;
5013
+ }
5014
+ } // Flush output
5015
+
5016
+
5017
+ out[this.suspenseDepth] += footer;
5018
+ continue;
5019
+ }
5020
+
5021
+ var child = frame.children[frame.childIndex++];
5022
+ var outBuffer = '';
5023
+
5024
+ if (true) {
5025
+ pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
5026
+
5027
+ frame.debugElementStack.length = 0;
5028
+ }
5029
+
5030
+ try {
5031
+ outBuffer += this.render(child, frame.context, frame.domNamespace);
5032
+ } catch (err) {
5033
+ if (err != null && typeof err.then === 'function') {
5034
+ if (enableSuspenseServerRenderer) ; else {
5035
+ if (!false) {
5036
+ {
5037
+ throw Error(true ? "ReactDOMServer does not yet support Suspense." : formatProdErrorMessage(294));
5038
+ }
5039
+ }
5040
+ }
5041
+ } else {
5042
+ throw err;
5043
+ }
5044
+ } finally {
5045
+ if (true) {
5046
+ popCurrentDebugStack();
5047
+ }
5048
+ }
5049
+
5050
+ if (out.length <= this.suspenseDepth) {
5051
+ out.push('');
5052
+ }
5053
+
5054
+ out[this.suspenseDepth] += outBuffer;
5055
+ }
5056
+
5057
+ return out[0];
5058
+ } finally {
5059
+ ReactCurrentDispatcher.current = prevDispatcher;
5060
+ setCurrentThreadID(prevThreadID);
5061
+ }
5062
+ };
5063
+
5064
+ _proto.render = function render(child, context, parentNamespace) {
5065
+ if (typeof child === 'string' || typeof child === 'number') {
5066
+ var text = '' + child;
5067
+
5068
+ if (text === '') {
5069
+ return '';
5070
+ }
5071
+
5072
+ if (this.makeStaticMarkup) {
5073
+ return escapeTextForBrowser(text);
5074
+ }
5075
+
5076
+ if (this.previousWasTextNode) {
5077
+ return '<!-- -->' + escapeTextForBrowser(text);
5078
+ }
5079
+
5080
+ this.previousWasTextNode = true;
5081
+ return escapeTextForBrowser(text);
5082
+ } else {
5083
+ var nextChild;
5084
+
5085
+ var _resolve = resolve(child, context, this.threadID);
5086
+
5087
+ nextChild = _resolve.child;
5088
+ context = _resolve.context;
5089
+
5090
+ if (nextChild === null || nextChild === false) {
5091
+ return '';
5092
+ } else if (!React$1.isValidElement(nextChild)) {
5093
+ if (nextChild != null && nextChild.$$typeof != null) {
5094
+ // Catch unexpected special types early.
5095
+ var $$typeof = nextChild.$$typeof;
5096
+
5097
+ if (!($$typeof !== REACT_PORTAL_TYPE)) {
5098
+ {
5099
+ throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
5100
+ }
5101
+ } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
5102
+
5103
+
5104
+ {
5105
+ {
5106
+ throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
5107
+ }
5108
+ }
5109
+ }
5110
+
5111
+ var nextChildren = toArray(nextChild);
5112
+ var frame = {
5113
+ type: null,
5114
+ domNamespace: parentNamespace,
5115
+ children: nextChildren,
5116
+ childIndex: 0,
5117
+ context: context,
5118
+ footer: ''
5119
+ };
5120
+
5121
+ {
5122
+ frame.debugElementStack = [];
5123
+ }
5124
+
5125
+ this.stack.push(frame);
5126
+ return '';
5127
+ } // Safe because we just checked it's an element.
5128
+
5129
+
5130
+ var nextElement = nextChild;
5131
+ var elementType = nextElement.type;
5132
+
5133
+ if (typeof elementType === 'string') {
5134
+ return this.renderDOM(nextElement, context, parentNamespace);
5135
+ }
5136
+
5137
+ switch (elementType) {
5138
+ case REACT_STRICT_MODE_TYPE:
5139
+ case REACT_CONCURRENT_MODE_TYPE:
5140
+ case REACT_PROFILER_TYPE:
5141
+ case REACT_SUSPENSE_LIST_TYPE:
5142
+ case REACT_FRAGMENT_TYPE:
5143
+ {
5144
+ var _nextChildren = toArray(nextChild.props.children);
5145
+
5146
+ var _frame = {
5147
+ type: null,
5148
+ domNamespace: parentNamespace,
5149
+ children: _nextChildren,
5150
+ childIndex: 0,
5151
+ context: context,
5152
+ footer: ''
5153
+ };
5154
+
5155
+ {
5156
+ _frame.debugElementStack = [];
5157
+ }
5158
+
5159
+ this.stack.push(_frame);
5160
+ return '';
5161
+ }
5162
+
5163
+ case REACT_SUSPENSE_TYPE:
5164
+ {
5165
+ {
5166
+ {
5167
+ {
5168
+ throw Error( "ReactDOMServer does not yet support Suspense." );
5169
+ }
5170
+ }
5171
+ }
5172
+ }
5173
+ }
5174
+
5175
+ if (typeof elementType === 'object' && elementType !== null) {
5176
+ switch (elementType.$$typeof) {
5177
+ case REACT_FORWARD_REF_TYPE:
5178
+ {
5179
+ var element = nextChild;
5180
+
5181
+ var _nextChildren4;
5182
+
5183
+ var componentIdentity = {};
5184
+ prepareToUseHooks(componentIdentity);
5185
+ _nextChildren4 = elementType.render(element.props, element.ref);
5186
+ _nextChildren4 = finishHooks(elementType.render, element.props, _nextChildren4, element.ref);
5187
+ _nextChildren4 = toArray(_nextChildren4);
5188
+ var _frame4 = {
5189
+ type: null,
5190
+ domNamespace: parentNamespace,
5191
+ children: _nextChildren4,
5192
+ childIndex: 0,
5193
+ context: context,
5194
+ footer: ''
5195
+ };
5196
+
5197
+ {
5198
+ _frame4.debugElementStack = [];
5199
+ }
5200
+
5201
+ this.stack.push(_frame4);
5202
+ return '';
5203
+ }
5204
+
5205
+ case REACT_MEMO_TYPE:
5206
+ {
5207
+ var _element = nextChild;
5208
+ var _nextChildren5 = [React$1.createElement(elementType.type, _assign({
5209
+ ref: _element.ref
5210
+ }, _element.props))];
5211
+ var _frame5 = {
5212
+ type: null,
5213
+ domNamespace: parentNamespace,
5214
+ children: _nextChildren5,
5215
+ childIndex: 0,
5216
+ context: context,
5217
+ footer: ''
5218
+ };
5219
+
5220
+ {
5221
+ _frame5.debugElementStack = [];
5222
+ }
5223
+
5224
+ this.stack.push(_frame5);
5225
+ return '';
5226
+ }
5227
+
5228
+ case REACT_PROVIDER_TYPE:
5229
+ {
5230
+ var provider = nextChild;
5231
+ var nextProps = provider.props;
5232
+
5233
+ var _nextChildren6 = toArray(nextProps.children);
5234
+
5235
+ var _frame6 = {
5236
+ type: provider,
5237
+ domNamespace: parentNamespace,
5238
+ children: _nextChildren6,
5239
+ childIndex: 0,
5240
+ context: context,
5241
+ footer: ''
5242
+ };
5243
+
5244
+ {
5245
+ _frame6.debugElementStack = [];
5246
+ }
5247
+
5248
+ this.pushProvider(provider);
5249
+ this.stack.push(_frame6);
5250
+ return '';
5251
+ }
5252
+
5253
+ case REACT_CONTEXT_TYPE:
5254
+ {
5255
+ var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In
5256
+ // DEV mode, we create a separate object for Context.Consumer that acts
5257
+ // like a proxy to Context. This proxy object adds unnecessary code in PROD
5258
+ // so we use the old behaviour (Context.Consumer references Context) to
5259
+ // reduce size and overhead. The separate object references context via
5260
+ // a property called "_context", which also gives us the ability to check
5261
+ // in DEV mode if this property exists or not and warn if it does not.
5262
+
5263
+ {
5264
+ if (reactContext._context === undefined) {
5265
+ // This may be because it's a Context (rather than a Consumer).
5266
+ // Or it may be because it's older React where they're the same thing.
5267
+ // We only want to warn if we're sure it's a new React.
5268
+ if (reactContext !== reactContext.Consumer) {
5269
+ if (!hasWarnedAboutUsingContextAsConsumer) {
5270
+ hasWarnedAboutUsingContextAsConsumer = true;
5271
+
5272
+ error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
5273
+ }
5274
+ }
5275
+ } else {
5276
+ reactContext = reactContext._context;
5277
+ }
5278
+ }
5279
+
5280
+ var _nextProps = nextChild.props;
5281
+ var threadID = this.threadID;
5282
+ validateContextBounds(reactContext, threadID);
5283
+ var nextValue = reactContext[threadID];
5284
+
5285
+ var _nextChildren7 = toArray(_nextProps.children(nextValue));
5286
+
5287
+ var _frame7 = {
5288
+ type: nextChild,
5289
+ domNamespace: parentNamespace,
5290
+ children: _nextChildren7,
5291
+ childIndex: 0,
5292
+ context: context,
5293
+ footer: ''
5294
+ };
5295
+
5296
+ {
5297
+ _frame7.debugElementStack = [];
5298
+ }
5299
+
5300
+ this.stack.push(_frame7);
5301
+ return '';
5302
+ }
5303
+ // eslint-disable-next-line-no-fallthrough
5304
+
5305
+ case REACT_FUNDAMENTAL_TYPE:
5306
+ {
5307
+
5308
+ {
5309
+ {
5310
+ throw Error( "ReactDOMServer does not yet support the fundamental API." );
5311
+ }
5312
+ }
5313
+ }
5314
+ // eslint-disable-next-line-no-fallthrough
5315
+
5316
+ case REACT_LAZY_TYPE:
5317
+ {
5318
+ var _element2 = nextChild;
5319
+ var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the
5320
+ // suspense server-side renderer is enabled so synchronously
5321
+ // resolved constructors are supported.
5322
+
5323
+ initializeLazyComponentType(lazyComponent);
5324
+
5325
+ switch (lazyComponent._status) {
5326
+ case Resolved:
5327
+ {
5328
+ var _nextChildren9 = [React$1.createElement(lazyComponent._result, _assign({
5329
+ ref: _element2.ref
5330
+ }, _element2.props))];
5331
+ var _frame9 = {
5332
+ type: null,
5333
+ domNamespace: parentNamespace,
5334
+ children: _nextChildren9,
5335
+ childIndex: 0,
5336
+ context: context,
5337
+ footer: ''
5338
+ };
5339
+
5340
+ {
5341
+ _frame9.debugElementStack = [];
5342
+ }
5343
+
5344
+ this.stack.push(_frame9);
5345
+ return '';
5346
+ }
5347
+
5348
+ case Rejected:
5349
+ throw lazyComponent._result;
5350
+
5351
+ case Pending:
5352
+ default:
5353
+ {
5354
+ {
5355
+ throw Error( "ReactDOMServer does not yet support lazy-loaded components." );
5356
+ }
5357
+ }
5358
+
5359
+ }
5360
+ }
5361
+ // eslint-disable-next-line-no-fallthrough
5362
+
5363
+ case REACT_SCOPE_TYPE:
5364
+ {
5365
+
5366
+ {
5367
+ {
5368
+ throw Error( "ReactDOMServer does not yet support scope components." );
5369
+ }
5370
+ }
5371
+ }
5372
+ }
5373
+ }
5374
+
5375
+ var info = '';
5376
+
5377
+ {
5378
+ var owner = nextElement._owner;
5379
+
5380
+ if (elementType === undefined || typeof elementType === 'object' && elementType !== null && Object.keys(elementType).length === 0) {
5381
+ 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.';
5382
+ }
5383
+
5384
+ var ownerName = owner ? getComponentName(owner) : null;
5385
+
5386
+ if (ownerName) {
5387
+ info += '\n\nCheck the render method of `' + ownerName + '`.';
5388
+ }
5389
+ }
5390
+
5391
+ {
5392
+ {
5393
+ throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info );
5394
+ }
5395
+ }
5396
+ }
5397
+ };
5398
+
5399
+ _proto.renderDOM = function renderDOM(element, context, parentNamespace) {
5400
+ var tag = element.type.toLowerCase();
5401
+ var namespace = parentNamespace;
5402
+
5403
+ if (parentNamespace === Namespaces.html) {
5404
+ namespace = getIntrinsicNamespace(tag);
5405
+ }
5406
+
5407
+ {
5408
+ if (namespace === Namespaces.html) {
5409
+ // Should this check be gated by parent namespace? Not sure we want to
5410
+ // allow <SVG> or <mATH>.
5411
+ if (tag !== element.type) {
5412
+ error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
5413
+ }
5414
+ }
5415
+ }
5416
+
5417
+ validateDangerousTag(tag);
5418
+ var props = element.props;
5419
+
5420
+ if (tag === 'input') {
5421
+ {
5422
+ ReactControlledValuePropTypes.checkPropTypes('input', props);
5423
+
5424
+ if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
5425
+ error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
5426
+
5427
+ didWarnDefaultChecked = true;
5428
+ }
5429
+
5430
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
5431
+ error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
5432
+
5433
+ didWarnDefaultInputValue = true;
5434
+ }
5435
+ }
5436
+
5437
+ props = _assign({
5438
+ type: undefined
5439
+ }, props, {
5440
+ defaultChecked: undefined,
5441
+ defaultValue: undefined,
5442
+ value: props.value != null ? props.value : props.defaultValue,
5443
+ checked: props.checked != null ? props.checked : props.defaultChecked
5444
+ });
5445
+ } else if (tag === 'textarea') {
5446
+ {
5447
+ ReactControlledValuePropTypes.checkPropTypes('textarea', props);
5448
+
5449
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
5450
+ error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
5451
+
5452
+ didWarnDefaultTextareaValue = true;
5453
+ }
5454
+ }
5455
+
5456
+ var initialValue = props.value;
5457
+
5458
+ if (initialValue == null) {
5459
+ var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>.
5460
+
5461
+ var textareaChildren = props.children;
5462
+
5463
+ if (textareaChildren != null) {
5464
+ {
5465
+ error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
5466
+ }
5467
+
5468
+ if (!(defaultValue == null)) {
5469
+ {
5470
+ throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
5471
+ }
5472
+ }
5473
+
5474
+ if (Array.isArray(textareaChildren)) {
5475
+ if (!(textareaChildren.length <= 1)) {
5476
+ {
5477
+ throw Error( "<textarea> can only have at most one child." );
5478
+ }
5479
+ }
5480
+
5481
+ textareaChildren = textareaChildren[0];
5482
+ }
5483
+
5484
+ defaultValue = '' + textareaChildren;
5485
+ }
5486
+
5487
+ if (defaultValue == null) {
5488
+ defaultValue = '';
5489
+ }
5490
+
5491
+ initialValue = defaultValue;
5492
+ }
5493
+
5494
+ props = _assign({}, props, {
5495
+ value: undefined,
5496
+ children: '' + initialValue
5497
+ });
5498
+ } else if (tag === 'select') {
5499
+ {
5500
+ ReactControlledValuePropTypes.checkPropTypes('select', props);
5501
+
5502
+ for (var i = 0; i < valuePropNames.length; i++) {
5503
+ var propName = valuePropNames[i];
5504
+
5505
+ if (props[propName] == null) {
5506
+ continue;
5507
+ }
5508
+
5509
+ var isArray = Array.isArray(props[propName]);
5510
+
5511
+ if (props.multiple && !isArray) {
5512
+ error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
5513
+ } else if (!props.multiple && isArray) {
5514
+ error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
5515
+ }
5516
+ }
5517
+
5518
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
5519
+ error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
5520
+
5521
+ didWarnDefaultSelectValue = true;
5522
+ }
5523
+ }
5524
+
5525
+ this.currentSelectValue = props.value != null ? props.value : props.defaultValue;
5526
+ props = _assign({}, props, {
5527
+ value: undefined
5528
+ });
5529
+ } else if (tag === 'option') {
5530
+ var selected = null;
5531
+ var selectValue = this.currentSelectValue;
5532
+ var optionChildren = flattenOptionChildren(props.children);
5533
+
5534
+ if (selectValue != null) {
5535
+ var value;
5536
+
5537
+ if (props.value != null) {
5538
+ value = props.value + '';
5539
+ } else {
5540
+ value = optionChildren;
5541
+ }
5542
+
5543
+ selected = false;
5544
+
5545
+ if (Array.isArray(selectValue)) {
5546
+ // multiple
5547
+ for (var j = 0; j < selectValue.length; j++) {
5548
+ if ('' + selectValue[j] === value) {
5549
+ selected = true;
5550
+ break;
5551
+ }
5552
+ }
5553
+ } else {
5554
+ selected = '' + selectValue === value;
5555
+ }
5556
+
5557
+ props = _assign({
5558
+ selected: undefined,
5559
+ children: undefined
5560
+ }, props, {
5561
+ selected: selected,
5562
+ children: optionChildren
5563
+ });
5564
+ }
5565
+ }
5566
+
5567
+ {
5568
+ validatePropertiesInDevelopment(tag, props);
5569
+ }
5570
+
5571
+ assertValidProps(tag, props);
5572
+ var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
5573
+ var footer = '';
5574
+
5575
+ if (omittedCloseTags.hasOwnProperty(tag)) {
5576
+ out += '/>';
5577
+ } else {
5578
+ out += '>';
5579
+ footer = '</' + element.type + '>';
5580
+ }
5581
+
5582
+ var children;
5583
+ var innerMarkup = getNonChildrenInnerMarkup(props);
5584
+
5585
+ if (innerMarkup != null) {
5586
+ children = [];
5587
+
5588
+ if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
5589
+ // text/html ignores the first character in these tags if it's a newline
5590
+ // Prefer to break application/xml over text/html (for now) by adding
5591
+ // a newline specifically to get eaten by the parser. (Alternately for
5592
+ // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
5593
+ // \r is normalized out by HTMLTextAreaElement#value.)
5594
+ // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
5595
+ // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
5596
+ // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
5597
+ // See: Parsing of "textarea" "listing" and "pre" elements
5598
+ // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
5599
+ out += '\n';
5600
+ }
5601
+
5602
+ out += innerMarkup;
5603
+ } else {
5604
+ children = toArray(props.children);
5605
+ }
5606
+
5607
+ var frame = {
5608
+ domNamespace: getChildNamespace(parentNamespace, element.type),
5609
+ type: tag,
5610
+ children: children,
5611
+ childIndex: 0,
5612
+ context: context,
5613
+ footer: footer
5614
+ };
5615
+
5616
+ {
5617
+ frame.debugElementStack = [];
5618
+ }
5619
+
5620
+ this.stack.push(frame);
5621
+ this.previousWasTextNode = false;
5622
+ return out;
5623
+ };
5624
+
5625
+ return ReactDOMServerRenderer;
5626
+ }();
5627
+
5628
+ /**
5629
+ * Render a ReactElement to its initial HTML. This should only be used on the
5630
+ * server.
5631
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostring
5632
+ */
5633
+
5634
+ function renderToString(element) {
5635
+ var renderer = new ReactDOMServerRenderer(element, false);
5636
+
5637
+ try {
5638
+ var markup = renderer.read(Infinity);
5639
+ return markup;
5640
+ } finally {
5641
+ renderer.destroy();
5642
+ }
5643
+ }
5644
+ /**
5645
+ * Similar to renderToString, except this doesn't create extra DOM attributes
5646
+ * such as data-react-id that React uses internally.
5647
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
5648
+ */
5649
+
5650
+ function renderToStaticMarkup(element) {
5651
+ var renderer = new ReactDOMServerRenderer(element, true);
5652
+
5653
+ try {
5654
+ var markup = renderer.read(Infinity);
5655
+ return markup;
5656
+ } finally {
5657
+ renderer.destroy();
5658
+ }
5659
+ }
5660
+
5661
+ function renderToNodeStream() {
5662
+ {
5663
+ {
5664
+ throw Error( "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead." );
5665
+ }
5666
+ }
5667
+ }
5668
+
5669
+ function renderToStaticNodeStream() {
5670
+ {
5671
+ {
5672
+ throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
5673
+ }
5674
+ }
5675
+ } // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
5676
+
5677
+
5678
+ var ReactDOMServer = {
5679
+ renderToString: renderToString,
5680
+ renderToStaticMarkup: renderToStaticMarkup,
5681
+ renderToNodeStream: renderToNodeStream,
5682
+ renderToStaticNodeStream: renderToStaticNodeStream,
5683
+ version: ReactVersion
5684
+ };
5685
+
5686
+ // TODO: decide on the top-level export form.
5687
+ // This is hacky but makes it work with both Rollup and Jest
5688
+
5689
+
5690
+ var server_browser = ReactDOMServer.default || ReactDOMServer;
5691
+
5692
+ reactDomServer_browser_development.exports = server_browser;
5693
+ })();
5694
+ }
5695
+ return reactDomServer_browser_development.exports;
5696
+ }
5697
+
5698
+ var hasRequiredServer_browser;
5699
+
5700
+ function requireServer_browser () {
5701
+ if (hasRequiredServer_browser) return server_browser.exports;
5702
+ hasRequiredServer_browser = 1;
5703
+
5704
+ if (process.env.NODE_ENV === 'production') {
5705
+ server_browser.exports = requireReactDomServer_browser_production_min();
5706
+ } else {
5707
+ server_browser.exports = requireReactDomServer_browser_development();
5708
+ }
5709
+ return server_browser.exports;
5710
+ }
5711
+
5712
+ var server_browserExports = requireServer_browser();
5713
+
1371
5714
  const log$1 = debug('@pie-lib:text-select:token-select');
1372
5715
  class TokenSelect extends React.Component {
1373
5716
  constructor(...args) {
@@ -1473,7 +5816,7 @@ class TokenSelect extends React.Component {
1473
5816
 
1474
5817
  if (selectable && !disabled || showCorrectAnswer || t.selected || t.isMissing || animationsDisabled && t.predefined // if we are in print mode
1475
5818
  ) {
1476
- return finalAcc + renderToString( /*#__PURE__*/React.createElement(Token$1, _extends({
5819
+ return finalAcc + server_browserExports.renderToString( /*#__PURE__*/React.createElement(Token$1, _extends({
1477
5820
  key: index,
1478
5821
  disabled: disabled,
1479
5822
  index: index