@planningcenter/topbar 11.0.1 → 11.0.2-qa-767.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/topbar.js CHANGED
@@ -152,6 +152,4503 @@ function requireClassnames () {
152
152
  var classnamesExports = requireClassnames();
153
153
  var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
154
154
 
155
+ var server_browser = {exports: {}};
156
+
157
+ var reactDomServer_browser_production_min = {};
158
+
159
+ /*
160
+ object-assign
161
+ (c) Sindre Sorhus
162
+ @license MIT
163
+ */
164
+
165
+ var objectAssign;
166
+ var hasRequiredObjectAssign;
167
+
168
+ function requireObjectAssign () {
169
+ if (hasRequiredObjectAssign) return objectAssign;
170
+ hasRequiredObjectAssign = 1;
171
+ /* eslint-disable no-unused-vars */
172
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
173
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
174
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
175
+
176
+ function toObject(val) {
177
+ if (val === null || val === undefined) {
178
+ throw new TypeError('Object.assign cannot be called with null or undefined');
179
+ }
180
+
181
+ return Object(val);
182
+ }
183
+
184
+ function shouldUseNative() {
185
+ try {
186
+ if (!Object.assign) {
187
+ return false;
188
+ }
189
+
190
+ // Detect buggy property enumeration order in older V8 versions.
191
+
192
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
193
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
194
+ test1[5] = 'de';
195
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
196
+ return false;
197
+ }
198
+
199
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
200
+ var test2 = {};
201
+ for (var i = 0; i < 10; i++) {
202
+ test2['_' + String.fromCharCode(i)] = i;
203
+ }
204
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
205
+ return test2[n];
206
+ });
207
+ if (order2.join('') !== '0123456789') {
208
+ return false;
209
+ }
210
+
211
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
212
+ var test3 = {};
213
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
214
+ test3[letter] = letter;
215
+ });
216
+ if (Object.keys(Object.assign({}, test3)).join('') !==
217
+ 'abcdefghijklmnopqrst') {
218
+ return false;
219
+ }
220
+
221
+ return true;
222
+ } catch (err) {
223
+ // We don't expect any of the above to throw, but better to be safe.
224
+ return false;
225
+ }
226
+ }
227
+
228
+ objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
229
+ var from;
230
+ var to = toObject(target);
231
+ var symbols;
232
+
233
+ for (var s = 1; s < arguments.length; s++) {
234
+ from = Object(arguments[s]);
235
+
236
+ for (var key in from) {
237
+ if (hasOwnProperty.call(from, key)) {
238
+ to[key] = from[key];
239
+ }
240
+ }
241
+
242
+ if (getOwnPropertySymbols) {
243
+ symbols = getOwnPropertySymbols(from);
244
+ for (var i = 0; i < symbols.length; i++) {
245
+ if (propIsEnumerable.call(from, symbols[i])) {
246
+ to[symbols[i]] = from[symbols[i]];
247
+ }
248
+ }
249
+ }
250
+ }
251
+
252
+ return to;
253
+ };
254
+ return objectAssign;
255
+ }
256
+
257
+ /** @license React v17.0.2
258
+ * react-dom-server.browser.production.min.js
259
+ *
260
+ * Copyright (c) Facebook, Inc. and its affiliates.
261
+ *
262
+ * This source code is licensed under the MIT license found in the
263
+ * LICENSE file in the root directory of this source tree.
264
+ */
265
+
266
+ var hasRequiredReactDomServer_browser_production_min;
267
+
268
+ function requireReactDomServer_browser_production_min () {
269
+ if (hasRequiredReactDomServer_browser_production_min) return reactDomServer_browser_production_min;
270
+ hasRequiredReactDomServer_browser_production_min = 1;
271
+ var l=requireObjectAssign(),m=React;function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
272
+ var q=60106,r=60107,u=60108,z=60114,B=60109,aa=60110,ba=60112,D=60113,ca=60120,da=60115,ea=60116,fa=60121,ha=60117,ia=60119,ja=60129,ka=60131;
273
+ if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;q=E("react.portal");r=E("react.fragment");u=E("react.strict_mode");z=E("react.profiler");B=E("react.provider");aa=E("react.context");ba=E("react.forward_ref");D=E("react.suspense");ca=E("react.suspense_list");da=E("react.memo");ea=E("react.lazy");fa=E("react.block");ha=E("react.fundamental");ia=E("react.scope");ja=E("react.debug_trace_mode");ka=E("react.legacy_hidden");}
274
+ function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case r:return "Fragment";case q:return "Portal";case z:return "Profiler";case u:return "StrictMode";case D:return "Suspense";case ca:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case aa:return (a.displayName||"Context")+".Consumer";case B:return (a._context.displayName||"Context")+".Provider";case ba:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
275
+ (""!==b?"ForwardRef("+b+")":"ForwardRef");case da:return F(a.type);case fa:return F(a._render);case ea:b=a._payload;a=a._init;try{return F(a(b))}catch(c){}}return null}var la=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ma={};function I(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1;}function na(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return I(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c;}else b=ma;return b}
276
+ for(var J=new Uint16Array(16),K=0;15>K;K++)J[K]=K+1;J[15]=0;var oa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pa=Object.prototype.hasOwnProperty,qa={},ra={};
277
+ function sa(a){if(pa.call(ra,a))return true;if(pa.call(qa,a))return false;if(oa.test(a))return ra[a]=true;qa[a]=true;return false}function ta(a,b,c,d){if(null!==c&&0===c.type)return false;switch(typeof b){case "function":case "symbol":return true;case "boolean":if(null!==c)return !c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return "data-"!==a&&"aria-"!==a;default:return false}}
278
+ function ua(a,b,c,d){if(null===b||"undefined"===typeof b||ta(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 M(a,b,c,d,f,h,t){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=h;this.removeEmptyString=t;}var N={};
279
+ "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){N[a]=new M(a,0,false,a,null,false,false);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,false,a[1],null,false,false);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){N[a]=new M(a,2,false,a.toLowerCase(),null,false,false);});
280
+ ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){N[a]=new M(a,2,false,a,null,false,false);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){N[a]=new M(a,3,false,a.toLowerCase(),null,false,false);});
281
+ ["checked","multiple","muted","selected"].forEach(function(a){N[a]=new M(a,3,true,a,null,false,false);});["capture","download"].forEach(function(a){N[a]=new M(a,4,false,a,null,false,false);});["cols","rows","size","span"].forEach(function(a){N[a]=new M(a,6,false,a,null,false,false);});["rowSpan","start"].forEach(function(a){N[a]=new M(a,5,false,a.toLowerCase(),null,false,false);});var va=/[\-:]([a-z])/g;function wa(a){return a[1].toUpperCase()}
282
+ "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(va,
283
+ wa);N[b]=new M(b,1,false,a,null,false,false);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,false,a,"http://www.w3.org/1999/xlink",false,false);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,false,a,"http://www.w3.org/XML/1998/namespace",false,false);});["tabIndex","crossOrigin"].forEach(function(a){N[a]=new M(a,1,false,a.toLowerCase(),null,false,false);});
284
+ N.xlinkHref=new M("xlinkHref",1,false,"xlink:href","http://www.w3.org/1999/xlink",true,false);["src","href","action","formAction"].forEach(function(a){N[a]=new M(a,1,false,a.toLowerCase(),null,true,true);});var xa=/["'&<>]/;
285
+ function O(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}
286
+ function ya(a,b){var c=N.hasOwnProperty(a)?N[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?false:true;if(d||ua(a,b,c))return "";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&true===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(O(b)+'"')}return sa(a)?a+'="'+(O(b)+'"'):""}function za(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
287
+ var Aa="function"===typeof Object.is?Object.is:za,P=null,Q=null,R=null,S=false,T=false,U=null,V=0;function W(){if(null===P)throw Error(p(321));return P}function Ba(){if(0<V)throw Error(p(312));return {memoizedState:null,queue:null,next:null}}function Ca(){null===R?null===Q?(S=false,Q=R=Ba()):(S=true,R=Q):null===R.next?(S=false,R=R.next=Ba()):(S=true,R=R.next);return R}function Da(a,b,c,d){for(;T;)T=false,V+=1,R=null,c=a(b,d);Ea();return c}function Ea(){P=null;T=false;Q=null;V=0;R=U=null;}
288
+ function Fa(a,b){return "function"===typeof b?b(a):b}function Ga(a,b,c){P=W();R=Ca();if(S){var d=R.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=R.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);R.memoizedState=d;return [d,b]}return [R.memoizedState,b]}a=a===Fa?"function"===typeof b?b():b:void 0!==c?c(b):b;R.memoizedState=a;a=R.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,P,a);return [R.memoizedState,a]}
289
+ function Ia(a,b){P=W();R=Ca();b=void 0===b?null:b;if(null!==R){var c=R.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=false;else {for(var 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();R.memoizedState=[a,b];return a}function Ha(a,b,c){if(!(25>V))throw Error(p(301));if(a===P)if(T=true,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else {for(b=c;null!==b.next;)b=b.next;b.next=a;}}function Ja(){}
290
+ var X=null,Ka={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ia,useReducer:Ga,useRef:function(a){P=W();R=Ca();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ga(Fa,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ia(function(){return a},b)},useImperativeHandle:Ja,useEffect:Ja,useDebugValue:Ja,useDeferredValue:function(a){W();return a},useTransition:function(){W();
291
+ return [function(a){a();},false]},useOpaqueIdentifier:function(){return (X.identifierPrefix||"")+"R:"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},La={html:"http://www.w3.org/1999/xhtml"};function Ma(a){switch(a){case "svg":return "http://www.w3.org/2000/svg";case "math":return "http://www.w3.org/1998/Math/MathML";default:return "http://www.w3.org/1999/xhtml"}}
292
+ var Na={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},Oa=l({menuitem:true},Na),Y={animationIterationCount:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridArea:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,
293
+ gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true},Pa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a];});});
294
+ var Qa=/([A-Z])/g,Ra=/^ms-/,Z=m.Children.toArray,Sa=la.ReactCurrentDispatcher,Ta={listing:true,pre:true,textarea:true},Ua=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Va={},Wa={};function Xa(a){if(void 0===a||null===a)return a;var b="";m.Children.forEach(a,function(a){null!=a&&(b+=a);});return b}var Ya=Object.prototype.hasOwnProperty,Za={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function $a(a,b){if(void 0===a)throw Error(p(152,F(b)||"Component"));}
295
+ function ab(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=na(h,b,c,e),t=[],g=false,n={isMounted:function(){return false},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,c){g=true;t=[c];},enqueueSetState:function(a,c){if(null===t)return null;t.push(c);}};if(e){if(e=new h(d.props,f,n),"function"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k));}}else if(P={},e=h(d.props,
296
+ f,n),e=Da(h,d.props,e,f),null==e||null==e.render){a=e;$a(a,h);return}e.props=d.props;e.context=f;e.updater=n;n=e.state;void 0===n&&(e.state=n=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){n=t;var v=
297
+ g;t=null;g=false;if(v&&1===n.length)e.state=n[0];else {k=v?n[0]:e.state;var H=true;for(v=v?1:0;v<n.length;v++){var x=n[v];x="function"===typeof x?x.call(e,k,d.props,f):x;null!=x&&(H?(H=false,k=l({},k,x)):l(k,x));}e.state=k;}}else t=null;a=e.render();$a(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var y=e.getChildContext();for(var A in y)if(!(A in d))throw Error(p(108,F(h)||"Unknown",A));}y&&(b=l({},b,y));}for(;m.isValidElement(a);){var f=a,h=f.type;if("function"!==
298
+ typeof h)break;d(f,h);}return {child:a,context:b}}
299
+ var bb=function(){function a(a,b,f){m.isValidElement(a)?a.type!==r?a=[a]:(a=a.props.children,a=m.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:La.html,children:a,childIndex:0,context:ma,footer:""};var c=J[0];if(0===c){var d=J;c=d.length;var g=2*c;if(!(65536>=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d<g-1;d++)J[d]=d+1;J[g-1]=0;}else J[0]=J[c];this.threadID=c;this.stack=[a];this.exhausted=false;this.currentSelectValue=null;this.previousWasTextNode=false;
300
+ this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||"";}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=true;this.clearProviders();var a=this.threadID;J[a]=J[0];J[0]=a;}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;I(c,h);var t=c[h];this.contextStack[b]=c;this.contextValueStack[b]=t;c[h]=a.props.value;};b.popProvider=
301
+ function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];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;var c=Sa.current;Sa.current=Ka;try{for(var h=[""],t=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;
302
+ J[g]=J[0];J[0]=g;break}var e=this.stack[this.stack.length-1];if(t||e.childIndex>=e.children.length){var L=e.footer;""!==L&&(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===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=
303
+ G;}h[this.suspenseDepth]+=L;}else {var n=e.children[e.childIndex++],k="";try{k+=this.render(n,e.context,e.domNamespace);}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=k;}}return h[0]}finally{Sa.current=c,X=b,Ea();}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return "";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return "\x3c!-- --\x3e"+O(f);
304
+ this.previousWasTextNode=true;return O(f)}b=ab(a,b,this.threadID);a=b.child;b=b.context;if(null===a||false===a)return "";if(!m.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(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 ka:case ja:case u:case z:case ca:case r:return a=Z(a.props.children),this.stack.push({type:null,
305
+ domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case D:throw Error(p(294));case ia:throw Error(p(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ba:P={};var d=c.render(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 da:return a=[m.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
306
+ "";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case aa:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return "";case ha:throw Error(p(338));case ea:return c=a.type,d=c._init,c=d(c._payload),a=[m.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,
307
+ context:b,footer:""}),""}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();if(!Va.hasOwnProperty(c)){if(!Ua.test(c))throw Error(p(65,c));Va[c]=true;}var d=a.props;if("input"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
308
+ g)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0];}g=""+e;}null==g&&(g="");}d=l({},d,{value:void 0,children:""+g});}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var L=Xa(d.children);if(null!=e){var G=null!=d.value?d.value+"":L;g=false;if(Array.isArray(e))for(var C=0;C<e.length;C++){if(""+e[C]===G){g=true;break}}else g=""+e===G;d=l({selected:void 0,children:void 0},
309
+ d,{selected:g,children:L});}}if(g=d){if(Oa[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(p(137,c));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(p(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(p(62));}g=d;e=this.makeStaticMarkup;L=1===this.stack.length;G="<"+a.type;b:if(-1===c.indexOf("-"))C="string"===typeof g.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":C=
310
+ false;break b;default:C=true;}for(w in g)if(Ya.call(g,w)){var n=g[w];if(null!=n){if("style"===w){var k=void 0,v="",H="";for(k in n)if(n.hasOwnProperty(k)){var x=0===k.indexOf("--"),y=n[k];if(null!=y){if(x)var A=k;else if(A=k,Wa.hasOwnProperty(A))A=Wa[A];else {var cb=A.replace(Qa,"-$1").toLowerCase().replace(Ra,"-ms-");A=Wa[A]=cb;}v+=H+A+":";H=k;x=null==y||"boolean"===typeof y||""===y?"":x||"number"!==typeof y||0===y||Y.hasOwnProperty(H)&&Y[H]?(""+y).trim():y+"px";v+=x;H=";";}}n=v||null;}k=null;C?Za.hasOwnProperty(w)||
311
+ (k=w,k=sa(k)&&null!=n?k+'="'+(O(n)+'"'):""):k=ya(w,n);k&&(G+=" "+k);}}e||L&&(G+=' data-reactroot=""');var w=G;g="";Na.hasOwnProperty(c)?w+="/>":(w+=">",g="</"+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=O(e);break a}e=null;}null!=e?(d=[],Ta.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(w+="\n"),w+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?Ma(a):"http://www.w3.org/2000/svg"===
312
+ f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=false;return w};return a}();reactDomServer_browser_production_min.renderToNodeStream=function(){throw Error(p(207));};reactDomServer_browser_production_min.renderToStaticMarkup=function(a,b){a=new bb(a,true,b);try{return a.read(Infinity)}finally{a.destroy();}};reactDomServer_browser_production_min.renderToStaticNodeStream=function(){throw Error(p(208));};reactDomServer_browser_production_min.renderToString=function(a,b){a=new bb(a,false,b);try{return a.read(Infinity)}finally{a.destroy();}};
313
+ reactDomServer_browser_production_min.version="17.0.2";
314
+ return reactDomServer_browser_production_min;
315
+ }
316
+
317
+ var reactDomServer_browser_development = {};
318
+
319
+ /** @license React v17.0.2
320
+ * react-dom-server.browser.development.js
321
+ *
322
+ * Copyright (c) Facebook, Inc. and its affiliates.
323
+ *
324
+ * This source code is licensed under the MIT license found in the
325
+ * LICENSE file in the root directory of this source tree.
326
+ */
327
+
328
+ var hasRequiredReactDomServer_browser_development;
329
+
330
+ function requireReactDomServer_browser_development () {
331
+ if (hasRequiredReactDomServer_browser_development) return reactDomServer_browser_development;
332
+ hasRequiredReactDomServer_browser_development = 1;
333
+
334
+ if (process.env.NODE_ENV !== "production") {
335
+ (function() {
336
+
337
+ var React$1 = React;
338
+ var _assign = requireObjectAssign();
339
+
340
+ // Do not require this module directly! Use normal `invariant` calls with
341
+ // template literal strings. The messages will be replaced with error codes
342
+ // during build.
343
+ function formatProdErrorMessage(code) {
344
+ var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
345
+
346
+ for (var i = 1; i < arguments.length; i++) {
347
+ url += '&args[]=' + encodeURIComponent(arguments[i]);
348
+ }
349
+
350
+ 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.';
351
+ }
352
+
353
+ // TODO: this is special because it gets imported during build.
354
+ var ReactVersion = '17.0.2';
355
+
356
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
357
+
358
+ // by calls to these methods by a Babel plugin.
359
+ //
360
+ // In PROD (or in packages without access to React internals),
361
+ // they are left as they are instead.
362
+
363
+ function warn(format) {
364
+ {
365
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
366
+ args[_key - 1] = arguments[_key];
367
+ }
368
+
369
+ printWarning('warn', format, args);
370
+ }
371
+ }
372
+ function error(format) {
373
+ {
374
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
375
+ args[_key2 - 1] = arguments[_key2];
376
+ }
377
+
378
+ printWarning('error', format, args);
379
+ }
380
+ }
381
+
382
+ function printWarning(level, format, args) {
383
+ // When changing this logic, you might want to also
384
+ // update consoleWithStackDev.www.js as well.
385
+ {
386
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
387
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
388
+
389
+ if (stack !== '') {
390
+ format += '%s';
391
+ args = args.concat([stack]);
392
+ }
393
+
394
+ var argsWithFormat = args.map(function (item) {
395
+ return '' + item;
396
+ }); // Careful: RN currently depends on this prefix
397
+
398
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
399
+ // breaks IE9: https://github.com/facebook/react/issues/13610
400
+ // eslint-disable-next-line react-internal/no-production-logging
401
+
402
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
403
+ }
404
+ }
405
+ var REACT_PORTAL_TYPE = 0xeaca;
406
+ var REACT_FRAGMENT_TYPE = 0xeacb;
407
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
408
+ var REACT_PROFILER_TYPE = 0xead2;
409
+ var REACT_PROVIDER_TYPE = 0xeacd;
410
+ var REACT_CONTEXT_TYPE = 0xeace;
411
+ var REACT_FORWARD_REF_TYPE = 0xead0;
412
+ var REACT_SUSPENSE_TYPE = 0xead1;
413
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
414
+ var REACT_MEMO_TYPE = 0xead3;
415
+ var REACT_LAZY_TYPE = 0xead4;
416
+ var REACT_BLOCK_TYPE = 0xead9;
417
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
418
+ var REACT_SCOPE_TYPE = 0xead7;
419
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
420
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
421
+
422
+ if (typeof Symbol === 'function' && Symbol.for) {
423
+ var symbolFor = Symbol.for;
424
+ symbolFor('react.element');
425
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
426
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
427
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
428
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
429
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
430
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
431
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
432
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
433
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
434
+ REACT_MEMO_TYPE = symbolFor('react.memo');
435
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
436
+ REACT_BLOCK_TYPE = symbolFor('react.block');
437
+ symbolFor('react.server.block');
438
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
439
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
440
+ symbolFor('react.opaque.id');
441
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
442
+ symbolFor('react.offscreen');
443
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
444
+ }
445
+
446
+ function getWrappedName(outerType, innerType, wrapperName) {
447
+ var functionName = innerType.displayName || innerType.name || '';
448
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
449
+ }
450
+
451
+ function getContextName(type) {
452
+ return type.displayName || 'Context';
453
+ }
454
+
455
+ function getComponentName(type) {
456
+ if (type == null) {
457
+ // Host root, text node or just invalid type.
458
+ return null;
459
+ }
460
+
461
+ {
462
+ if (typeof type.tag === 'number') {
463
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
464
+ }
465
+ }
466
+
467
+ if (typeof type === 'function') {
468
+ return type.displayName || type.name || null;
469
+ }
470
+
471
+ if (typeof type === 'string') {
472
+ return type;
473
+ }
474
+
475
+ switch (type) {
476
+ case REACT_FRAGMENT_TYPE:
477
+ return 'Fragment';
478
+
479
+ case REACT_PORTAL_TYPE:
480
+ return 'Portal';
481
+
482
+ case REACT_PROFILER_TYPE:
483
+ return 'Profiler';
484
+
485
+ case REACT_STRICT_MODE_TYPE:
486
+ return 'StrictMode';
487
+
488
+ case REACT_SUSPENSE_TYPE:
489
+ return 'Suspense';
490
+
491
+ case REACT_SUSPENSE_LIST_TYPE:
492
+ return 'SuspenseList';
493
+ }
494
+
495
+ if (typeof type === 'object') {
496
+ switch (type.$$typeof) {
497
+ case REACT_CONTEXT_TYPE:
498
+ var context = type;
499
+ return getContextName(context) + '.Consumer';
500
+
501
+ case REACT_PROVIDER_TYPE:
502
+ var provider = type;
503
+ return getContextName(provider._context) + '.Provider';
504
+
505
+ case REACT_FORWARD_REF_TYPE:
506
+ return getWrappedName(type, type.render, 'ForwardRef');
507
+
508
+ case REACT_MEMO_TYPE:
509
+ return getComponentName(type.type);
510
+
511
+ case REACT_BLOCK_TYPE:
512
+ return getComponentName(type._render);
513
+
514
+ case REACT_LAZY_TYPE:
515
+ {
516
+ var lazyComponent = type;
517
+ var payload = lazyComponent._payload;
518
+ var init = lazyComponent._init;
519
+
520
+ try {
521
+ return getComponentName(init(payload));
522
+ } catch (x) {
523
+ return null;
524
+ }
525
+ }
526
+ }
527
+ }
528
+
529
+ return null;
530
+ }
531
+
532
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
533
+
534
+ var enableSuspenseServerRenderer = false;
535
+
536
+ // Helpers to patch console.logs to avoid logging during side-effect free
537
+ // replaying on render function. This currently only patches the object
538
+ // lazily which won't cover if the log function was extracted eagerly.
539
+ // We could also eagerly patch the method.
540
+ var disabledDepth = 0;
541
+ var prevLog;
542
+ var prevInfo;
543
+ var prevWarn;
544
+ var prevError;
545
+ var prevGroup;
546
+ var prevGroupCollapsed;
547
+ var prevGroupEnd;
548
+
549
+ function disabledLog() {}
550
+
551
+ disabledLog.__reactDisabledLog = true;
552
+ function disableLogs() {
553
+ {
554
+ if (disabledDepth === 0) {
555
+ /* eslint-disable react-internal/no-production-logging */
556
+ prevLog = console.log;
557
+ prevInfo = console.info;
558
+ prevWarn = console.warn;
559
+ prevError = console.error;
560
+ prevGroup = console.group;
561
+ prevGroupCollapsed = console.groupCollapsed;
562
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
563
+
564
+ var props = {
565
+ configurable: true,
566
+ enumerable: true,
567
+ value: disabledLog,
568
+ writable: true
569
+ }; // $FlowFixMe Flow thinks console is immutable.
570
+
571
+ Object.defineProperties(console, {
572
+ info: props,
573
+ log: props,
574
+ warn: props,
575
+ error: props,
576
+ group: props,
577
+ groupCollapsed: props,
578
+ groupEnd: props
579
+ });
580
+ /* eslint-enable react-internal/no-production-logging */
581
+ }
582
+
583
+ disabledDepth++;
584
+ }
585
+ }
586
+ function reenableLogs() {
587
+ {
588
+ disabledDepth--;
589
+
590
+ if (disabledDepth === 0) {
591
+ /* eslint-disable react-internal/no-production-logging */
592
+ var props = {
593
+ configurable: true,
594
+ enumerable: true,
595
+ writable: true
596
+ }; // $FlowFixMe Flow thinks console is immutable.
597
+
598
+ Object.defineProperties(console, {
599
+ log: _assign({}, props, {
600
+ value: prevLog
601
+ }),
602
+ info: _assign({}, props, {
603
+ value: prevInfo
604
+ }),
605
+ warn: _assign({}, props, {
606
+ value: prevWarn
607
+ }),
608
+ error: _assign({}, props, {
609
+ value: prevError
610
+ }),
611
+ group: _assign({}, props, {
612
+ value: prevGroup
613
+ }),
614
+ groupCollapsed: _assign({}, props, {
615
+ value: prevGroupCollapsed
616
+ }),
617
+ groupEnd: _assign({}, props, {
618
+ value: prevGroupEnd
619
+ })
620
+ });
621
+ /* eslint-enable react-internal/no-production-logging */
622
+ }
623
+
624
+ if (disabledDepth < 0) {
625
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
626
+ }
627
+ }
628
+ }
629
+
630
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
631
+ var prefix;
632
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
633
+ {
634
+ if (prefix === undefined) {
635
+ // Extract the VM specific prefix used by each line.
636
+ try {
637
+ throw Error();
638
+ } catch (x) {
639
+ var match = x.stack.trim().match(/\n( *(at )?)/);
640
+ prefix = match && match[1] || '';
641
+ }
642
+ } // We use the prefix to ensure our stacks line up with native stack frames.
643
+
644
+
645
+ return '\n' + prefix + name;
646
+ }
647
+ }
648
+ var reentry = false;
649
+ var componentFrameCache;
650
+
651
+ {
652
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
653
+ componentFrameCache = new PossiblyWeakMap();
654
+ }
655
+
656
+ function describeNativeComponentFrame(fn, construct) {
657
+ // If something asked for a stack inside a fake render, it should get ignored.
658
+ if (!fn || reentry) {
659
+ return '';
660
+ }
661
+
662
+ {
663
+ var frame = componentFrameCache.get(fn);
664
+
665
+ if (frame !== undefined) {
666
+ return frame;
667
+ }
668
+ }
669
+
670
+ var control;
671
+ reentry = true;
672
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
673
+
674
+ Error.prepareStackTrace = undefined;
675
+ var previousDispatcher;
676
+
677
+ {
678
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
679
+ // for warnings.
680
+
681
+ ReactCurrentDispatcher.current = null;
682
+ disableLogs();
683
+ }
684
+
685
+ try {
686
+ // This should throw.
687
+ if (construct) {
688
+ // Something should be setting the props in the constructor.
689
+ var Fake = function () {
690
+ throw Error();
691
+ }; // $FlowFixMe
692
+
693
+
694
+ Object.defineProperty(Fake.prototype, 'props', {
695
+ set: function () {
696
+ // We use a throwing setter instead of frozen or non-writable props
697
+ // because that won't throw in a non-strict mode function.
698
+ throw Error();
699
+ }
700
+ });
701
+
702
+ if (typeof Reflect === 'object' && Reflect.construct) {
703
+ // We construct a different control for this case to include any extra
704
+ // frames added by the construct call.
705
+ try {
706
+ Reflect.construct(Fake, []);
707
+ } catch (x) {
708
+ control = x;
709
+ }
710
+
711
+ Reflect.construct(fn, [], Fake);
712
+ } else {
713
+ try {
714
+ Fake.call();
715
+ } catch (x) {
716
+ control = x;
717
+ }
718
+
719
+ fn.call(Fake.prototype);
720
+ }
721
+ } else {
722
+ try {
723
+ throw Error();
724
+ } catch (x) {
725
+ control = x;
726
+ }
727
+
728
+ fn();
729
+ }
730
+ } catch (sample) {
731
+ // This is inlined manually because closure doesn't do it for us.
732
+ if (sample && control && typeof sample.stack === 'string') {
733
+ // This extracts the first frame from the sample that isn't also in the control.
734
+ // Skipping one frame that we assume is the frame that calls the two.
735
+ var sampleLines = sample.stack.split('\n');
736
+ var controlLines = control.stack.split('\n');
737
+ var s = sampleLines.length - 1;
738
+ var c = controlLines.length - 1;
739
+
740
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
741
+ // We expect at least one stack frame to be shared.
742
+ // Typically this will be the root most one. However, stack frames may be
743
+ // cut off due to maximum stack limits. In this case, one maybe cut off
744
+ // earlier than the other. We assume that the sample is longer or the same
745
+ // and there for cut off earlier. So we should find the root most frame in
746
+ // the sample somewhere in the control.
747
+ c--;
748
+ }
749
+
750
+ for (; s >= 1 && c >= 0; s--, c--) {
751
+ // Next we find the first one that isn't the same which should be the
752
+ // frame that called our sample function and the control.
753
+ if (sampleLines[s] !== controlLines[c]) {
754
+ // In V8, the first line is describing the message but other VMs don't.
755
+ // If we're about to return the first line, and the control is also on the same
756
+ // line, that's a pretty good indicator that our sample threw at same line as
757
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
758
+ // This can happen if you passed a class to function component, or non-function.
759
+ if (s !== 1 || c !== 1) {
760
+ do {
761
+ s--;
762
+ c--; // We may still have similar intermediate frames from the construct call.
763
+ // The next one that isn't the same should be our match though.
764
+
765
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
766
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
767
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
768
+
769
+ {
770
+ if (typeof fn === 'function') {
771
+ componentFrameCache.set(fn, _frame);
772
+ }
773
+ } // Return the line we found.
774
+
775
+
776
+ return _frame;
777
+ }
778
+ } while (s >= 1 && c >= 0);
779
+ }
780
+
781
+ break;
782
+ }
783
+ }
784
+ }
785
+ } finally {
786
+ reentry = false;
787
+
788
+ {
789
+ ReactCurrentDispatcher.current = previousDispatcher;
790
+ reenableLogs();
791
+ }
792
+
793
+ Error.prepareStackTrace = previousPrepareStackTrace;
794
+ } // Fallback to just using the name if we couldn't make it throw.
795
+
796
+
797
+ var name = fn ? fn.displayName || fn.name : '';
798
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
799
+
800
+ {
801
+ if (typeof fn === 'function') {
802
+ componentFrameCache.set(fn, syntheticFrame);
803
+ }
804
+ }
805
+
806
+ return syntheticFrame;
807
+ }
808
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
809
+ {
810
+ return describeNativeComponentFrame(fn, false);
811
+ }
812
+ }
813
+
814
+ function shouldConstruct(Component) {
815
+ var prototype = Component.prototype;
816
+ return !!(prototype && prototype.isReactComponent);
817
+ }
818
+
819
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
820
+
821
+ if (type == null) {
822
+ return '';
823
+ }
824
+
825
+ if (typeof type === 'function') {
826
+ {
827
+ return describeNativeComponentFrame(type, shouldConstruct(type));
828
+ }
829
+ }
830
+
831
+ if (typeof type === 'string') {
832
+ return describeBuiltInComponentFrame(type);
833
+ }
834
+
835
+ switch (type) {
836
+ case REACT_SUSPENSE_TYPE:
837
+ return describeBuiltInComponentFrame('Suspense');
838
+
839
+ case REACT_SUSPENSE_LIST_TYPE:
840
+ return describeBuiltInComponentFrame('SuspenseList');
841
+ }
842
+
843
+ if (typeof type === 'object') {
844
+ switch (type.$$typeof) {
845
+ case REACT_FORWARD_REF_TYPE:
846
+ return describeFunctionComponentFrame(type.render);
847
+
848
+ case REACT_MEMO_TYPE:
849
+ // Memo may contain any component type so we recursively resolve it.
850
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
851
+
852
+ case REACT_BLOCK_TYPE:
853
+ return describeFunctionComponentFrame(type._render);
854
+
855
+ case REACT_LAZY_TYPE:
856
+ {
857
+ var lazyComponent = type;
858
+ var payload = lazyComponent._payload;
859
+ var init = lazyComponent._init;
860
+
861
+ try {
862
+ // Lazy may contain any component type so we recursively resolve it.
863
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
864
+ } catch (x) {}
865
+ }
866
+ }
867
+ }
868
+
869
+ return '';
870
+ }
871
+
872
+ var loggedTypeFailures = {};
873
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
874
+
875
+ function setCurrentlyValidatingElement(element) {
876
+ {
877
+ if (element) {
878
+ var owner = element._owner;
879
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
880
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
881
+ } else {
882
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
883
+ }
884
+ }
885
+ }
886
+
887
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
888
+ {
889
+ // $FlowFixMe This is okay but Flow doesn't know it.
890
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
891
+
892
+ for (var typeSpecName in typeSpecs) {
893
+ if (has(typeSpecs, typeSpecName)) {
894
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
895
+ // fail the render phase where it didn't fail before. So we log it.
896
+ // After these have been cleaned up, we'll let them throw.
897
+
898
+ try {
899
+ // This is intentionally an invariant that gets caught. It's the same
900
+ // behavior as without this statement except with a better message.
901
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
902
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
903
+ err.name = 'Invariant Violation';
904
+ throw err;
905
+ }
906
+
907
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
908
+ } catch (ex) {
909
+ error$1 = ex;
910
+ }
911
+
912
+ if (error$1 && !(error$1 instanceof Error)) {
913
+ setCurrentlyValidatingElement(element);
914
+
915
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName, location, typeSpecName, typeof error$1);
916
+
917
+ setCurrentlyValidatingElement(null);
918
+ }
919
+
920
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
921
+ // Only monitor this failure once because there tends to be a lot of the
922
+ // same error.
923
+ loggedTypeFailures[error$1.message] = true;
924
+ setCurrentlyValidatingElement(element);
925
+
926
+ error('Failed %s type: %s', location, error$1.message);
927
+
928
+ setCurrentlyValidatingElement(null);
929
+ }
930
+ }
931
+ }
932
+ }
933
+ }
934
+
935
+ var didWarnAboutInvalidateContextType;
936
+
937
+ {
938
+ didWarnAboutInvalidateContextType = new Set();
939
+ }
940
+
941
+ var emptyObject = {};
942
+
943
+ {
944
+ Object.freeze(emptyObject);
945
+ }
946
+
947
+ function maskContext(type, context) {
948
+ var contextTypes = type.contextTypes;
949
+
950
+ if (!contextTypes) {
951
+ return emptyObject;
952
+ }
953
+
954
+ var maskedContext = {};
955
+
956
+ for (var contextName in contextTypes) {
957
+ maskedContext[contextName] = context[contextName];
958
+ }
959
+
960
+ return maskedContext;
961
+ }
962
+
963
+ function checkContextTypes(typeSpecs, values, location) {
964
+ {
965
+ checkPropTypes(typeSpecs, values, location, 'Component');
966
+ }
967
+ }
968
+
969
+ function validateContextBounds(context, threadID) {
970
+ // If we don't have enough slots in this context to store this threadID,
971
+ // fill it in without leaving any holes to ensure that the VM optimizes
972
+ // this as non-holey index properties.
973
+ // (Note: If `react` package is < 16.6, _threadCount is undefined.)
974
+ for (var i = context._threadCount | 0; i <= threadID; i++) {
975
+ // We assume that this is the same as the defaultValue which might not be
976
+ // true if we're rendering inside a secondary renderer but they are
977
+ // secondary because these use cases are very rare.
978
+ context[i] = context._currentValue2;
979
+ context._threadCount = i + 1;
980
+ }
981
+ }
982
+ function processContext(type, context, threadID, isClass) {
983
+ if (isClass) {
984
+ var contextType = type.contextType;
985
+
986
+ {
987
+ if ('contextType' in type) {
988
+ var isValid = // Allow null for conditional declaration
989
+ contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
990
+
991
+ if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
992
+ didWarnAboutInvalidateContextType.add(type);
993
+ var addendum = '';
994
+
995
+ if (contextType === undefined) {
996
+ 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.';
997
+ } else if (typeof contextType !== 'object') {
998
+ addendum = ' However, it is set to a ' + typeof contextType + '.';
999
+ } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
1000
+ addendum = ' Did you accidentally pass the Context.Provider instead?';
1001
+ } else if (contextType._context !== undefined) {
1002
+ // <Context.Consumer>
1003
+ addendum = ' Did you accidentally pass the Context.Consumer instead?';
1004
+ } else {
1005
+ addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
1006
+ }
1007
+
1008
+ error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
1009
+ }
1010
+ }
1011
+ }
1012
+
1013
+ if (typeof contextType === 'object' && contextType !== null) {
1014
+ validateContextBounds(contextType, threadID);
1015
+ return contextType[threadID];
1016
+ }
1017
+
1018
+ {
1019
+ var maskedContext = maskContext(type, context);
1020
+
1021
+ {
1022
+ if (type.contextTypes) {
1023
+ checkContextTypes(type.contextTypes, maskedContext, 'context');
1024
+ }
1025
+ }
1026
+
1027
+ return maskedContext;
1028
+ }
1029
+ } else {
1030
+ {
1031
+ var _maskedContext = maskContext(type, context);
1032
+
1033
+ {
1034
+ if (type.contextTypes) {
1035
+ checkContextTypes(type.contextTypes, _maskedContext, 'context');
1036
+ }
1037
+ }
1038
+
1039
+ return _maskedContext;
1040
+ }
1041
+ }
1042
+ }
1043
+
1044
+ var nextAvailableThreadIDs = new Uint16Array(16);
1045
+
1046
+ for (var i = 0; i < 15; i++) {
1047
+ nextAvailableThreadIDs[i] = i + 1;
1048
+ }
1049
+
1050
+ nextAvailableThreadIDs[15] = 0;
1051
+
1052
+ function growThreadCountAndReturnNextAvailable() {
1053
+ var oldArray = nextAvailableThreadIDs;
1054
+ var oldSize = oldArray.length;
1055
+ var newSize = oldSize * 2;
1056
+
1057
+ if (!(newSize <= 0x10000)) {
1058
+ {
1059
+ 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." );
1060
+ }
1061
+ }
1062
+
1063
+ var newArray = new Uint16Array(newSize);
1064
+ newArray.set(oldArray);
1065
+ nextAvailableThreadIDs = newArray;
1066
+ nextAvailableThreadIDs[0] = oldSize + 1;
1067
+
1068
+ for (var _i = oldSize; _i < newSize - 1; _i++) {
1069
+ nextAvailableThreadIDs[_i] = _i + 1;
1070
+ }
1071
+
1072
+ nextAvailableThreadIDs[newSize - 1] = 0;
1073
+ return oldSize;
1074
+ }
1075
+
1076
+ function allocThreadID() {
1077
+ var nextID = nextAvailableThreadIDs[0];
1078
+
1079
+ if (nextID === 0) {
1080
+ return growThreadCountAndReturnNextAvailable();
1081
+ }
1082
+
1083
+ nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID];
1084
+ return nextID;
1085
+ }
1086
+ function freeThreadID(id) {
1087
+ nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0];
1088
+ nextAvailableThreadIDs[0] = id;
1089
+ }
1090
+
1091
+ // A reserved attribute.
1092
+ // It is handled by React separately and shouldn't be written to the DOM.
1093
+ var RESERVED = 0; // A simple string attribute.
1094
+ // Attributes that aren't in the filter are presumed to have this type.
1095
+
1096
+ var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
1097
+ // "enumerated" attributes with "true" and "false" as possible values.
1098
+ // When true, it should be set to a "true" string.
1099
+ // When false, it should be set to a "false" string.
1100
+
1101
+ var BOOLEANISH_STRING = 2; // A real boolean attribute.
1102
+ // When true, it should be present (set either to an empty string or its name).
1103
+ // When false, it should be omitted.
1104
+
1105
+ var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
1106
+ // When true, it should be present (set either to an empty string or its name).
1107
+ // When false, it should be omitted.
1108
+ // For any other value, should be present with that value.
1109
+
1110
+ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
1111
+ // When falsy, it should be removed.
1112
+
1113
+ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
1114
+ // When falsy, it should be removed.
1115
+
1116
+ var POSITIVE_NUMERIC = 6;
1117
+
1118
+ /* eslint-disable max-len */
1119
+ 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";
1120
+ /* eslint-enable max-len */
1121
+
1122
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
1123
+ var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
1124
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
1125
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1126
+ var illegalAttributeNameCache = {};
1127
+ var validatedAttributeNameCache = {};
1128
+ function isAttributeNameSafe(attributeName) {
1129
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
1130
+ return true;
1131
+ }
1132
+
1133
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
1134
+ return false;
1135
+ }
1136
+
1137
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
1138
+ validatedAttributeNameCache[attributeName] = true;
1139
+ return true;
1140
+ }
1141
+
1142
+ illegalAttributeNameCache[attributeName] = true;
1143
+
1144
+ {
1145
+ error('Invalid attribute name: `%s`', attributeName);
1146
+ }
1147
+
1148
+ return false;
1149
+ }
1150
+ function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
1151
+ if (propertyInfo !== null) {
1152
+ return propertyInfo.type === RESERVED;
1153
+ }
1154
+
1155
+ if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
1156
+ return true;
1157
+ }
1158
+
1159
+ return false;
1160
+ }
1161
+ function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
1162
+ if (propertyInfo !== null && propertyInfo.type === RESERVED) {
1163
+ return false;
1164
+ }
1165
+
1166
+ switch (typeof value) {
1167
+ case 'function': // $FlowIssue symbol is perfectly valid here
1168
+
1169
+ case 'symbol':
1170
+ // eslint-disable-line
1171
+ return true;
1172
+
1173
+ case 'boolean':
1174
+ {
1175
+
1176
+ if (propertyInfo !== null) {
1177
+ return !propertyInfo.acceptsBooleans;
1178
+ } else {
1179
+ var prefix = name.toLowerCase().slice(0, 5);
1180
+ return prefix !== 'data-' && prefix !== 'aria-';
1181
+ }
1182
+ }
1183
+
1184
+ default:
1185
+ return false;
1186
+ }
1187
+ }
1188
+ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
1189
+ if (value === null || typeof value === 'undefined') {
1190
+ return true;
1191
+ }
1192
+
1193
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
1194
+ return true;
1195
+ }
1196
+
1197
+ if (propertyInfo !== null) {
1198
+
1199
+ switch (propertyInfo.type) {
1200
+ case BOOLEAN:
1201
+ return !value;
1202
+
1203
+ case OVERLOADED_BOOLEAN:
1204
+ return value === false;
1205
+
1206
+ case NUMERIC:
1207
+ return isNaN(value);
1208
+
1209
+ case POSITIVE_NUMERIC:
1210
+ return isNaN(value) || value < 1;
1211
+ }
1212
+ }
1213
+
1214
+ return false;
1215
+ }
1216
+ function getPropertyInfo(name) {
1217
+ return properties.hasOwnProperty(name) ? properties[name] : null;
1218
+ }
1219
+
1220
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
1221
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
1222
+ this.attributeName = attributeName;
1223
+ this.attributeNamespace = attributeNamespace;
1224
+ this.mustUseProperty = mustUseProperty;
1225
+ this.propertyName = name;
1226
+ this.type = type;
1227
+ this.sanitizeURL = sanitizeURL;
1228
+ this.removeEmptyString = removeEmptyString;
1229
+ } // When adding attributes to this list, be sure to also add them to
1230
+ // the `possibleStandardNames` module to ensure casing and incorrect
1231
+ // name warnings.
1232
+
1233
+
1234
+ var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
1235
+
1236
+ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
1237
+ // elements (not just inputs). Now that ReactDOMInput assigns to the
1238
+ // defaultValue property -- do we need this?
1239
+ 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
1240
+ reservedProps.forEach(function (name) {
1241
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
1242
+ name, // attributeName
1243
+ null, // attributeNamespace
1244
+ false, // sanitizeURL
1245
+ false);
1246
+ }); // A few React string attributes have a different name.
1247
+ // This is a mapping from React prop names to the attribute names.
1248
+
1249
+ [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
1250
+ var name = _ref[0],
1251
+ attributeName = _ref[1];
1252
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1253
+ attributeName, // attributeName
1254
+ null, // attributeNamespace
1255
+ false, // sanitizeURL
1256
+ false);
1257
+ }); // These are "enumerated" HTML attributes that accept "true" and "false".
1258
+ // In React, we let users pass `true` and `false` even though technically
1259
+ // these aren't boolean attributes (they are coerced to strings).
1260
+
1261
+ ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
1262
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
1263
+ name.toLowerCase(), // attributeName
1264
+ null, // attributeNamespace
1265
+ false, // sanitizeURL
1266
+ false);
1267
+ }); // These are "enumerated" SVG attributes that accept "true" and "false".
1268
+ // In React, we let users pass `true` and `false` even though technically
1269
+ // these aren't boolean attributes (they are coerced to strings).
1270
+ // Since these are SVG attributes, their attribute names are case-sensitive.
1271
+
1272
+ ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
1273
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
1274
+ name, // attributeName
1275
+ null, // attributeNamespace
1276
+ false, // sanitizeURL
1277
+ false);
1278
+ }); // These are HTML boolean attributes.
1279
+
1280
+ ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
1281
+ // on the client side because the browsers are inconsistent. Instead we call focus().
1282
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
1283
+ 'itemScope'].forEach(function (name) {
1284
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
1285
+ name.toLowerCase(), // attributeName
1286
+ null, // attributeNamespace
1287
+ false, // sanitizeURL
1288
+ false);
1289
+ }); // These are the few React props that we set as DOM properties
1290
+ // rather than attributes. These are all booleans.
1291
+
1292
+ ['checked', // Note: `option.selected` is not updated if `select.multiple` is
1293
+ // disabled with `removeAttribute`. We have special logic for handling this.
1294
+ 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
1295
+ // you'll need to set attributeName to name.toLowerCase()
1296
+ // instead in the assignment below.
1297
+ ].forEach(function (name) {
1298
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
1299
+ name, // attributeName
1300
+ null, // attributeNamespace
1301
+ false, // sanitizeURL
1302
+ false);
1303
+ }); // These are HTML attributes that are "overloaded booleans": they behave like
1304
+ // booleans, but can also accept a string value.
1305
+
1306
+ ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
1307
+ // you'll need to set attributeName to name.toLowerCase()
1308
+ // instead in the assignment below.
1309
+ ].forEach(function (name) {
1310
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
1311
+ name, // attributeName
1312
+ null, // attributeNamespace
1313
+ false, // sanitizeURL
1314
+ false);
1315
+ }); // These are HTML attributes that must be positive numbers.
1316
+
1317
+ ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
1318
+ // you'll need to set attributeName to name.toLowerCase()
1319
+ // instead in the assignment below.
1320
+ ].forEach(function (name) {
1321
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
1322
+ name, // attributeName
1323
+ null, // attributeNamespace
1324
+ false, // sanitizeURL
1325
+ false);
1326
+ }); // These are HTML attributes that must be numbers.
1327
+
1328
+ ['rowSpan', 'start'].forEach(function (name) {
1329
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
1330
+ name.toLowerCase(), // attributeName
1331
+ null, // attributeNamespace
1332
+ false, // sanitizeURL
1333
+ false);
1334
+ });
1335
+ var CAMELIZE = /[\-\:]([a-z])/g;
1336
+
1337
+ var capitalize = function (token) {
1338
+ return token[1].toUpperCase();
1339
+ }; // This is a list of all SVG attributes that need special casing, namespacing,
1340
+ // or boolean value assignment. Regular attributes that just accept strings
1341
+ // and have the same names are omitted, just like in the HTML attribute filter.
1342
+ // Some of these attributes can be hard to find. This list was created by
1343
+ // scraping the MDN documentation.
1344
+
1345
+
1346
+ ['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,
1347
+ // you'll need to set attributeName to name.toLowerCase()
1348
+ // instead in the assignment below.
1349
+ ].forEach(function (attributeName) {
1350
+ var name = attributeName.replace(CAMELIZE, capitalize);
1351
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1352
+ attributeName, null, // attributeNamespace
1353
+ false, // sanitizeURL
1354
+ false);
1355
+ }); // String SVG attributes with the xlink namespace.
1356
+
1357
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
1358
+ // you'll need to set attributeName to name.toLowerCase()
1359
+ // instead in the assignment below.
1360
+ ].forEach(function (attributeName) {
1361
+ var name = attributeName.replace(CAMELIZE, capitalize);
1362
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1363
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
1364
+ false);
1365
+ }); // String SVG attributes with the xml namespace.
1366
+
1367
+ ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
1368
+ // you'll need to set attributeName to name.toLowerCase()
1369
+ // instead in the assignment below.
1370
+ ].forEach(function (attributeName) {
1371
+ var name = attributeName.replace(CAMELIZE, capitalize);
1372
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1373
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
1374
+ false);
1375
+ }); // These attribute exists both in HTML and SVG.
1376
+ // The attribute name is case-sensitive in SVG so we can't just use
1377
+ // the React name like we do for attributes that exist only in HTML.
1378
+
1379
+ ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
1380
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
1381
+ attributeName.toLowerCase(), // attributeName
1382
+ null, // attributeNamespace
1383
+ false, // sanitizeURL
1384
+ false);
1385
+ }); // These attributes accept URLs. These must not allow javascript: URLS.
1386
+ // These will also need to accept Trusted Types object in the future.
1387
+
1388
+ var xlinkHref = 'xlinkHref';
1389
+ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
1390
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
1391
+ false);
1392
+ ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
1393
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
1394
+ attributeName.toLowerCase(), // attributeName
1395
+ null, // attributeNamespace
1396
+ true, // sanitizeURL
1397
+ true);
1398
+ });
1399
+
1400
+ // and any newline or tab are filtered out as if they're not part of the URL.
1401
+ // https://url.spec.whatwg.org/#url-parsing
1402
+ // Tab or newline are defined as \r\n\t:
1403
+ // https://infra.spec.whatwg.org/#ascii-tab-or-newline
1404
+ // A C0 control is a code point in the range \u0000 NULL to \u001F
1405
+ // INFORMATION SEPARATOR ONE, inclusive:
1406
+ // https://infra.spec.whatwg.org/#c0-control-or-space
1407
+
1408
+ /* eslint-disable max-len */
1409
+
1410
+ 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;
1411
+ var didWarn = false;
1412
+
1413
+ function sanitizeURL(url) {
1414
+ {
1415
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
1416
+ didWarn = true;
1417
+
1418
+ 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));
1419
+ }
1420
+ }
1421
+ }
1422
+
1423
+ // code copied and modified from escape-html
1424
+
1425
+ /**
1426
+ * Module variables.
1427
+ * @private
1428
+ */
1429
+ var matchHtmlRegExp = /["'&<>]/;
1430
+ /**
1431
+ * Escapes special characters and HTML entities in a given html string.
1432
+ *
1433
+ * @param {string} string HTML string to escape for later insertion
1434
+ * @return {string}
1435
+ * @public
1436
+ */
1437
+
1438
+ function escapeHtml(string) {
1439
+ var str = '' + string;
1440
+ var match = matchHtmlRegExp.exec(str);
1441
+
1442
+ if (!match) {
1443
+ return str;
1444
+ }
1445
+
1446
+ var escape;
1447
+ var html = '';
1448
+ var index;
1449
+ var lastIndex = 0;
1450
+
1451
+ for (index = match.index; index < str.length; index++) {
1452
+ switch (str.charCodeAt(index)) {
1453
+ case 34:
1454
+ // "
1455
+ escape = '&quot;';
1456
+ break;
1457
+
1458
+ case 38:
1459
+ // &
1460
+ escape = '&amp;';
1461
+ break;
1462
+
1463
+ case 39:
1464
+ // '
1465
+ escape = '&#x27;'; // modified from escape-html; used to be '&#39'
1466
+
1467
+ break;
1468
+
1469
+ case 60:
1470
+ // <
1471
+ escape = '&lt;';
1472
+ break;
1473
+
1474
+ case 62:
1475
+ // >
1476
+ escape = '&gt;';
1477
+ break;
1478
+
1479
+ default:
1480
+ continue;
1481
+ }
1482
+
1483
+ if (lastIndex !== index) {
1484
+ html += str.substring(lastIndex, index);
1485
+ }
1486
+
1487
+ lastIndex = index + 1;
1488
+ html += escape;
1489
+ }
1490
+
1491
+ return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
1492
+ } // end code copied and modified from escape-html
1493
+
1494
+ /**
1495
+ * Escapes text to prevent scripting attacks.
1496
+ *
1497
+ * @param {*} text Text value to escape.
1498
+ * @return {string} An escaped string.
1499
+ */
1500
+
1501
+
1502
+ function escapeTextForBrowser(text) {
1503
+ if (typeof text === 'boolean' || typeof text === 'number') {
1504
+ // this shortcircuit helps perf for types that we know will never have
1505
+ // special characters, especially given that this function is used often
1506
+ // for numeric dom ids.
1507
+ return '' + text;
1508
+ }
1509
+
1510
+ return escapeHtml(text);
1511
+ }
1512
+
1513
+ /**
1514
+ * Escapes attribute value to prevent scripting attacks.
1515
+ *
1516
+ * @param {*} value Value to escape.
1517
+ * @return {string} An escaped string.
1518
+ */
1519
+
1520
+ function quoteAttributeValueForBrowser(value) {
1521
+ return '"' + escapeTextForBrowser(value) + '"';
1522
+ }
1523
+
1524
+ function createMarkupForRoot() {
1525
+ return ROOT_ATTRIBUTE_NAME + '=""';
1526
+ }
1527
+ /**
1528
+ * Creates markup for a property.
1529
+ *
1530
+ * @param {string} name
1531
+ * @param {*} value
1532
+ * @return {?string} Markup string, or null if the property was invalid.
1533
+ */
1534
+
1535
+ function createMarkupForProperty(name, value) {
1536
+ var propertyInfo = getPropertyInfo(name);
1537
+
1538
+ if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo)) {
1539
+ return '';
1540
+ }
1541
+
1542
+ if (shouldRemoveAttribute(name, value, propertyInfo)) {
1543
+ return '';
1544
+ }
1545
+
1546
+ if (propertyInfo !== null) {
1547
+ var attributeName = propertyInfo.attributeName;
1548
+ var type = propertyInfo.type;
1549
+
1550
+ if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
1551
+ return attributeName + '=""';
1552
+ } else {
1553
+ if (propertyInfo.sanitizeURL) {
1554
+ value = '' + value;
1555
+ sanitizeURL(value);
1556
+ }
1557
+
1558
+ return attributeName + '=' + quoteAttributeValueForBrowser(value);
1559
+ }
1560
+ } else if (isAttributeNameSafe(name)) {
1561
+ return name + '=' + quoteAttributeValueForBrowser(value);
1562
+ }
1563
+
1564
+ return '';
1565
+ }
1566
+ /**
1567
+ * Creates markup for a custom property.
1568
+ *
1569
+ * @param {string} name
1570
+ * @param {*} value
1571
+ * @return {string} Markup string, or empty string if the property was invalid.
1572
+ */
1573
+
1574
+ function createMarkupForCustomAttribute(name, value) {
1575
+ if (!isAttributeNameSafe(name) || value == null) {
1576
+ return '';
1577
+ }
1578
+
1579
+ return name + '=' + quoteAttributeValueForBrowser(value);
1580
+ }
1581
+
1582
+ /**
1583
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
1584
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1585
+ */
1586
+ function is(x, y) {
1587
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
1588
+ ;
1589
+ }
1590
+
1591
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
1592
+
1593
+ var currentlyRenderingComponent = null;
1594
+ var firstWorkInProgressHook = null;
1595
+ var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook
1596
+
1597
+ var isReRender = false; // Whether an update was scheduled during the currently executing render pass.
1598
+
1599
+ var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates
1600
+
1601
+ var renderPhaseUpdates = null; // Counter to prevent infinite loops.
1602
+
1603
+ var numberOfReRenders = 0;
1604
+ var RE_RENDER_LIMIT = 25;
1605
+ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook
1606
+
1607
+ var currentHookNameInDev;
1608
+
1609
+ function resolveCurrentlyRenderingComponent() {
1610
+ if (!(currentlyRenderingComponent !== null)) {
1611
+ {
1612
+ 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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
1613
+ }
1614
+ }
1615
+
1616
+ {
1617
+ if (isInHookUserCodeInDev) {
1618
+ 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://reactjs.org/link/rules-of-hooks');
1619
+ }
1620
+ }
1621
+
1622
+ return currentlyRenderingComponent;
1623
+ }
1624
+
1625
+ function areHookInputsEqual(nextDeps, prevDeps) {
1626
+ if (prevDeps === null) {
1627
+ {
1628
+ 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);
1629
+ }
1630
+
1631
+ return false;
1632
+ }
1633
+
1634
+ {
1635
+ // Don't bother comparing lengths in prod because these arrays should be
1636
+ // passed inline.
1637
+ if (nextDeps.length !== prevDeps.length) {
1638
+ 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(', ') + "]");
1639
+ }
1640
+ }
1641
+
1642
+ for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
1643
+ if (objectIs(nextDeps[i], prevDeps[i])) {
1644
+ continue;
1645
+ }
1646
+
1647
+ return false;
1648
+ }
1649
+
1650
+ return true;
1651
+ }
1652
+
1653
+ function createHook() {
1654
+ if (numberOfReRenders > 0) {
1655
+ {
1656
+ {
1657
+ throw Error( "Rendered more hooks than during the previous render" );
1658
+ }
1659
+ }
1660
+ }
1661
+
1662
+ return {
1663
+ memoizedState: null,
1664
+ queue: null,
1665
+ next: null
1666
+ };
1667
+ }
1668
+
1669
+ function createWorkInProgressHook() {
1670
+ if (workInProgressHook === null) {
1671
+ // This is the first hook in the list
1672
+ if (firstWorkInProgressHook === null) {
1673
+ isReRender = false;
1674
+ firstWorkInProgressHook = workInProgressHook = createHook();
1675
+ } else {
1676
+ // There's already a work-in-progress. Reuse it.
1677
+ isReRender = true;
1678
+ workInProgressHook = firstWorkInProgressHook;
1679
+ }
1680
+ } else {
1681
+ if (workInProgressHook.next === null) {
1682
+ isReRender = false; // Append to the end of the list
1683
+
1684
+ workInProgressHook = workInProgressHook.next = createHook();
1685
+ } else {
1686
+ // There's already a work-in-progress. Reuse it.
1687
+ isReRender = true;
1688
+ workInProgressHook = workInProgressHook.next;
1689
+ }
1690
+ }
1691
+
1692
+ return workInProgressHook;
1693
+ }
1694
+
1695
+ function prepareToUseHooks(componentIdentity) {
1696
+ currentlyRenderingComponent = componentIdentity;
1697
+
1698
+ {
1699
+ isInHookUserCodeInDev = false;
1700
+ } // The following should have already been reset
1701
+ // didScheduleRenderPhaseUpdate = false;
1702
+ // firstWorkInProgressHook = null;
1703
+ // numberOfReRenders = 0;
1704
+ // renderPhaseUpdates = null;
1705
+ // workInProgressHook = null;
1706
+
1707
+ }
1708
+ function finishHooks(Component, props, children, refOrContext) {
1709
+ // This must be called after every function component to prevent hooks from
1710
+ // being used in classes.
1711
+ while (didScheduleRenderPhaseUpdate) {
1712
+ // Updates were scheduled during the render phase. They are stored in
1713
+ // the `renderPhaseUpdates` map. Call the component again, reusing the
1714
+ // work-in-progress hooks and applying the additional updates on top. Keep
1715
+ // restarting until no more updates are scheduled.
1716
+ didScheduleRenderPhaseUpdate = false;
1717
+ numberOfReRenders += 1; // Start over from the beginning of the list
1718
+
1719
+ workInProgressHook = null;
1720
+ children = Component(props, refOrContext);
1721
+ }
1722
+
1723
+ resetHooksState();
1724
+ return children;
1725
+ } // Reset the internal hooks state if an error occurs while rendering a component
1726
+
1727
+ function resetHooksState() {
1728
+ {
1729
+ isInHookUserCodeInDev = false;
1730
+ }
1731
+
1732
+ currentlyRenderingComponent = null;
1733
+ didScheduleRenderPhaseUpdate = false;
1734
+ firstWorkInProgressHook = null;
1735
+ numberOfReRenders = 0;
1736
+ renderPhaseUpdates = null;
1737
+ workInProgressHook = null;
1738
+ }
1739
+
1740
+ function readContext(context, observedBits) {
1741
+ var threadID = currentPartialRenderer.threadID;
1742
+ validateContextBounds(context, threadID);
1743
+
1744
+ {
1745
+ if (isInHookUserCodeInDev) {
1746
+ 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().');
1747
+ }
1748
+ }
1749
+
1750
+ return context[threadID];
1751
+ }
1752
+
1753
+ function useContext(context, observedBits) {
1754
+ {
1755
+ currentHookNameInDev = 'useContext';
1756
+ }
1757
+
1758
+ resolveCurrentlyRenderingComponent();
1759
+ var threadID = currentPartialRenderer.threadID;
1760
+ validateContextBounds(context, threadID);
1761
+ return context[threadID];
1762
+ }
1763
+
1764
+ function basicStateReducer(state, action) {
1765
+ // $FlowFixMe: Flow doesn't like mixed types
1766
+ return typeof action === 'function' ? action(state) : action;
1767
+ }
1768
+
1769
+ function useState(initialState) {
1770
+ {
1771
+ currentHookNameInDev = 'useState';
1772
+ }
1773
+
1774
+ return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers
1775
+ initialState);
1776
+ }
1777
+ function useReducer(reducer, initialArg, init) {
1778
+ {
1779
+ if (reducer !== basicStateReducer) {
1780
+ currentHookNameInDev = 'useReducer';
1781
+ }
1782
+ }
1783
+
1784
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
1785
+ workInProgressHook = createWorkInProgressHook();
1786
+
1787
+ if (isReRender) {
1788
+ // This is a re-render. Apply the new render phase updates to the previous
1789
+ // current hook.
1790
+ var queue = workInProgressHook.queue;
1791
+ var dispatch = queue.dispatch;
1792
+
1793
+ if (renderPhaseUpdates !== null) {
1794
+ // Render phase updates are stored in a map of queue -> linked list
1795
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
1796
+
1797
+ if (firstRenderPhaseUpdate !== undefined) {
1798
+ renderPhaseUpdates.delete(queue);
1799
+ var newState = workInProgressHook.memoizedState;
1800
+ var update = firstRenderPhaseUpdate;
1801
+
1802
+ do {
1803
+ // Process this render phase update. We don't have to check the
1804
+ // priority because it will always be the same as the current
1805
+ // render's.
1806
+ var action = update.action;
1807
+
1808
+ {
1809
+ isInHookUserCodeInDev = true;
1810
+ }
1811
+
1812
+ newState = reducer(newState, action);
1813
+
1814
+ {
1815
+ isInHookUserCodeInDev = false;
1816
+ }
1817
+
1818
+ update = update.next;
1819
+ } while (update !== null);
1820
+
1821
+ workInProgressHook.memoizedState = newState;
1822
+ return [newState, dispatch];
1823
+ }
1824
+ }
1825
+
1826
+ return [workInProgressHook.memoizedState, dispatch];
1827
+ } else {
1828
+ {
1829
+ isInHookUserCodeInDev = true;
1830
+ }
1831
+
1832
+ var initialState;
1833
+
1834
+ if (reducer === basicStateReducer) {
1835
+ // Special case for `useState`.
1836
+ initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
1837
+ } else {
1838
+ initialState = init !== undefined ? init(initialArg) : initialArg;
1839
+ }
1840
+
1841
+ {
1842
+ isInHookUserCodeInDev = false;
1843
+ }
1844
+
1845
+ workInProgressHook.memoizedState = initialState;
1846
+
1847
+ var _queue = workInProgressHook.queue = {
1848
+ last: null,
1849
+ dispatch: null
1850
+ };
1851
+
1852
+ var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
1853
+
1854
+ return [workInProgressHook.memoizedState, _dispatch];
1855
+ }
1856
+ }
1857
+
1858
+ function useMemo(nextCreate, deps) {
1859
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
1860
+ workInProgressHook = createWorkInProgressHook();
1861
+ var nextDeps = deps === undefined ? null : deps;
1862
+
1863
+ if (workInProgressHook !== null) {
1864
+ var prevState = workInProgressHook.memoizedState;
1865
+
1866
+ if (prevState !== null) {
1867
+ if (nextDeps !== null) {
1868
+ var prevDeps = prevState[1];
1869
+
1870
+ if (areHookInputsEqual(nextDeps, prevDeps)) {
1871
+ return prevState[0];
1872
+ }
1873
+ }
1874
+ }
1875
+ }
1876
+
1877
+ {
1878
+ isInHookUserCodeInDev = true;
1879
+ }
1880
+
1881
+ var nextValue = nextCreate();
1882
+
1883
+ {
1884
+ isInHookUserCodeInDev = false;
1885
+ }
1886
+
1887
+ workInProgressHook.memoizedState = [nextValue, nextDeps];
1888
+ return nextValue;
1889
+ }
1890
+
1891
+ function useRef(initialValue) {
1892
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
1893
+ workInProgressHook = createWorkInProgressHook();
1894
+ var previousRef = workInProgressHook.memoizedState;
1895
+
1896
+ if (previousRef === null) {
1897
+ var ref = {
1898
+ current: initialValue
1899
+ };
1900
+
1901
+ {
1902
+ Object.seal(ref);
1903
+ }
1904
+
1905
+ workInProgressHook.memoizedState = ref;
1906
+ return ref;
1907
+ } else {
1908
+ return previousRef;
1909
+ }
1910
+ }
1911
+
1912
+ function useLayoutEffect(create, inputs) {
1913
+ {
1914
+ currentHookNameInDev = 'useLayoutEffect';
1915
+
1916
+ 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://reactjs.org/link/uselayouteffect-ssr for common fixes.');
1917
+ }
1918
+ }
1919
+
1920
+ function dispatchAction(componentIdentity, queue, action) {
1921
+ if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
1922
+ {
1923
+ throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
1924
+ }
1925
+ }
1926
+
1927
+ if (componentIdentity === currentlyRenderingComponent) {
1928
+ // This is a render phase update. Stash it in a lazily-created map of
1929
+ // queue -> linked list of updates. After this render pass, we'll restart
1930
+ // and apply the stashed updates on top of the work-in-progress hook.
1931
+ didScheduleRenderPhaseUpdate = true;
1932
+ var update = {
1933
+ action: action,
1934
+ next: null
1935
+ };
1936
+
1937
+ if (renderPhaseUpdates === null) {
1938
+ renderPhaseUpdates = new Map();
1939
+ }
1940
+
1941
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
1942
+
1943
+ if (firstRenderPhaseUpdate === undefined) {
1944
+ renderPhaseUpdates.set(queue, update);
1945
+ } else {
1946
+ // Append the update to the end of the list.
1947
+ var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
1948
+
1949
+ while (lastRenderPhaseUpdate.next !== null) {
1950
+ lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
1951
+ }
1952
+
1953
+ lastRenderPhaseUpdate.next = update;
1954
+ }
1955
+ }
1956
+ }
1957
+
1958
+ function useCallback(callback, deps) {
1959
+ return useMemo(function () {
1960
+ return callback;
1961
+ }, deps);
1962
+ } // TODO Decide on how to implement this hook for server rendering.
1963
+ // If a mutation occurs during render, consider triggering a Suspense boundary
1964
+ // and falling back to client rendering.
1965
+
1966
+ function useMutableSource(source, getSnapshot, subscribe) {
1967
+ resolveCurrentlyRenderingComponent();
1968
+ return getSnapshot(source._source);
1969
+ }
1970
+
1971
+ function useDeferredValue(value) {
1972
+ resolveCurrentlyRenderingComponent();
1973
+ return value;
1974
+ }
1975
+
1976
+ function useTransition() {
1977
+ resolveCurrentlyRenderingComponent();
1978
+
1979
+ var startTransition = function (callback) {
1980
+ callback();
1981
+ };
1982
+
1983
+ return [startTransition, false];
1984
+ }
1985
+
1986
+ function useOpaqueIdentifier() {
1987
+ return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
1988
+ }
1989
+
1990
+ function noop() {}
1991
+
1992
+ var currentPartialRenderer = null;
1993
+ function setCurrentPartialRenderer(renderer) {
1994
+ currentPartialRenderer = renderer;
1995
+ }
1996
+ var Dispatcher = {
1997
+ readContext: readContext,
1998
+ useContext: useContext,
1999
+ useMemo: useMemo,
2000
+ useReducer: useReducer,
2001
+ useRef: useRef,
2002
+ useState: useState,
2003
+ useLayoutEffect: useLayoutEffect,
2004
+ useCallback: useCallback,
2005
+ // useImperativeHandle is not run in the server environment
2006
+ useImperativeHandle: noop,
2007
+ // Effects are not run in the server environment.
2008
+ useEffect: noop,
2009
+ // Debugging effect
2010
+ useDebugValue: noop,
2011
+ useDeferredValue: useDeferredValue,
2012
+ useTransition: useTransition,
2013
+ useOpaqueIdentifier: useOpaqueIdentifier,
2014
+ // Subscriptions are not setup in a server environment.
2015
+ useMutableSource: useMutableSource
2016
+ };
2017
+
2018
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
2019
+ var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
2020
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
2021
+ var Namespaces = {
2022
+ html: HTML_NAMESPACE}; // Assumes there is no parent namespace.
2023
+
2024
+ function getIntrinsicNamespace(type) {
2025
+ switch (type) {
2026
+ case 'svg':
2027
+ return SVG_NAMESPACE;
2028
+
2029
+ case 'math':
2030
+ return MATH_NAMESPACE;
2031
+
2032
+ default:
2033
+ return HTML_NAMESPACE;
2034
+ }
2035
+ }
2036
+ function getChildNamespace(parentNamespace, type) {
2037
+ if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
2038
+ // No (or default) parent namespace: potential entry point.
2039
+ return getIntrinsicNamespace(type);
2040
+ }
2041
+
2042
+ if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
2043
+ // We're leaving SVG.
2044
+ return HTML_NAMESPACE;
2045
+ } // By default, pass namespace below.
2046
+
2047
+
2048
+ return parentNamespace;
2049
+ }
2050
+
2051
+ var hasReadOnlyValue = {
2052
+ button: true,
2053
+ checkbox: true,
2054
+ image: true,
2055
+ hidden: true,
2056
+ radio: true,
2057
+ reset: true,
2058
+ submit: true
2059
+ };
2060
+ function checkControlledValueProps(tagName, props) {
2061
+ {
2062
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
2063
+ 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`.');
2064
+ }
2065
+
2066
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
2067
+ 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`.');
2068
+ }
2069
+ }
2070
+ }
2071
+
2072
+ // For HTML, certain tags should omit their close tag. We keep a list for
2073
+ // those special-case tags.
2074
+ var omittedCloseTags = {
2075
+ area: true,
2076
+ base: true,
2077
+ br: true,
2078
+ col: true,
2079
+ embed: true,
2080
+ hr: true,
2081
+ img: true,
2082
+ input: true,
2083
+ keygen: true,
2084
+ link: true,
2085
+ meta: true,
2086
+ param: true,
2087
+ source: true,
2088
+ track: true,
2089
+ wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
2090
+
2091
+ };
2092
+
2093
+ // `omittedCloseTags` except that `menuitem` should still have its closing tag.
2094
+
2095
+ var voidElementTags = _assign({
2096
+ menuitem: true
2097
+ }, omittedCloseTags);
2098
+
2099
+ var HTML = '__html';
2100
+
2101
+ function assertValidProps(tag, props) {
2102
+ if (!props) {
2103
+ return;
2104
+ } // Note the use of `==` which checks for null or undefined.
2105
+
2106
+
2107
+ if (voidElementTags[tag]) {
2108
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
2109
+ {
2110
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
2111
+ }
2112
+ }
2113
+ }
2114
+
2115
+ if (props.dangerouslySetInnerHTML != null) {
2116
+ if (!(props.children == null)) {
2117
+ {
2118
+ throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
2119
+ }
2120
+ }
2121
+
2122
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
2123
+ {
2124
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
2125
+ }
2126
+ }
2127
+ }
2128
+
2129
+ {
2130
+ if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
2131
+ 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.');
2132
+ }
2133
+ }
2134
+
2135
+ if (!(props.style == null || typeof props.style === 'object')) {
2136
+ {
2137
+ 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." );
2138
+ }
2139
+ }
2140
+ }
2141
+
2142
+ /**
2143
+ * CSS properties which accept numbers but are not in units of "px".
2144
+ */
2145
+ var isUnitlessNumber = {
2146
+ animationIterationCount: true,
2147
+ borderImageOutset: true,
2148
+ borderImageSlice: true,
2149
+ borderImageWidth: true,
2150
+ boxFlex: true,
2151
+ boxFlexGroup: true,
2152
+ boxOrdinalGroup: true,
2153
+ columnCount: true,
2154
+ columns: true,
2155
+ flex: true,
2156
+ flexGrow: true,
2157
+ flexPositive: true,
2158
+ flexShrink: true,
2159
+ flexNegative: true,
2160
+ flexOrder: true,
2161
+ gridArea: true,
2162
+ gridRow: true,
2163
+ gridRowEnd: true,
2164
+ gridRowSpan: true,
2165
+ gridRowStart: true,
2166
+ gridColumn: true,
2167
+ gridColumnEnd: true,
2168
+ gridColumnSpan: true,
2169
+ gridColumnStart: true,
2170
+ fontWeight: true,
2171
+ lineClamp: true,
2172
+ lineHeight: true,
2173
+ opacity: true,
2174
+ order: true,
2175
+ orphans: true,
2176
+ tabSize: true,
2177
+ widows: true,
2178
+ zIndex: true,
2179
+ zoom: true,
2180
+ // SVG-related properties
2181
+ fillOpacity: true,
2182
+ floodOpacity: true,
2183
+ stopOpacity: true,
2184
+ strokeDasharray: true,
2185
+ strokeDashoffset: true,
2186
+ strokeMiterlimit: true,
2187
+ strokeOpacity: true,
2188
+ strokeWidth: true
2189
+ };
2190
+ /**
2191
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
2192
+ * @param {string} key style name, eg: transitionDuration
2193
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
2194
+ * WebkitTransitionDuration
2195
+ */
2196
+
2197
+ function prefixKey(prefix, key) {
2198
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
2199
+ }
2200
+ /**
2201
+ * Support style names that may come passed in prefixed by adding permutations
2202
+ * of vendor prefixes.
2203
+ */
2204
+
2205
+
2206
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
2207
+ // infinite loop, because it iterates over the newly added props too.
2208
+
2209
+ Object.keys(isUnitlessNumber).forEach(function (prop) {
2210
+ prefixes.forEach(function (prefix) {
2211
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
2212
+ });
2213
+ });
2214
+
2215
+ /**
2216
+ * Convert a value into the proper css writable value. The style name `name`
2217
+ * should be logical (no hyphens), as specified
2218
+ * in `CSSProperty.isUnitlessNumber`.
2219
+ *
2220
+ * @param {string} name CSS property name such as `topMargin`.
2221
+ * @param {*} value CSS property value such as `10px`.
2222
+ * @return {string} Normalized style value with dimensions applied.
2223
+ */
2224
+
2225
+ function dangerousStyleValue(name, value, isCustomProperty) {
2226
+ // Note that we've removed escapeTextForBrowser() calls here since the
2227
+ // whole string will be escaped when the attribute is injected into
2228
+ // the markup. If you provide unsafe user data here they can inject
2229
+ // arbitrary CSS which may be problematic (I couldn't repro this):
2230
+ // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
2231
+ // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
2232
+ // This is not an XSS hole but instead a potential CSS injection issue
2233
+ // which has lead to a greater discussion about how we're going to
2234
+ // trust URLs moving forward. See #2115901
2235
+ var isEmpty = value == null || typeof value === 'boolean' || value === '';
2236
+
2237
+ if (isEmpty) {
2238
+ return '';
2239
+ }
2240
+
2241
+ if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
2242
+ return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
2243
+ }
2244
+
2245
+ return ('' + value).trim();
2246
+ }
2247
+
2248
+ var uppercasePattern = /([A-Z])/g;
2249
+ var msPattern = /^ms-/;
2250
+ /**
2251
+ * Hyphenates a camelcased CSS property name, for example:
2252
+ *
2253
+ * > hyphenateStyleName('backgroundColor')
2254
+ * < "background-color"
2255
+ * > hyphenateStyleName('MozTransition')
2256
+ * < "-moz-transition"
2257
+ * > hyphenateStyleName('msTransition')
2258
+ * < "-ms-transition"
2259
+ *
2260
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
2261
+ * is converted to `-ms-`.
2262
+ */
2263
+
2264
+ function hyphenateStyleName(name) {
2265
+ return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
2266
+ }
2267
+
2268
+ function isCustomComponent(tagName, props) {
2269
+ if (tagName.indexOf('-') === -1) {
2270
+ return typeof props.is === 'string';
2271
+ }
2272
+
2273
+ switch (tagName) {
2274
+ // These are reserved SVG and MathML elements.
2275
+ // We don't mind this list too much because we expect it to never grow.
2276
+ // The alternative is to track the namespace in a few places which is convoluted.
2277
+ // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
2278
+ case 'annotation-xml':
2279
+ case 'color-profile':
2280
+ case 'font-face':
2281
+ case 'font-face-src':
2282
+ case 'font-face-uri':
2283
+ case 'font-face-format':
2284
+ case 'font-face-name':
2285
+ case 'missing-glyph':
2286
+ return false;
2287
+
2288
+ default:
2289
+ return true;
2290
+ }
2291
+ }
2292
+
2293
+ var warnValidStyle = function () {};
2294
+
2295
+ {
2296
+ // 'msTransform' is correct, but the other prefixes should be capitalized
2297
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
2298
+ var msPattern$1 = /^-ms-/;
2299
+ var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
2300
+
2301
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
2302
+ var warnedStyleNames = {};
2303
+ var warnedStyleValues = {};
2304
+ var warnedForNaNValue = false;
2305
+ var warnedForInfinityValue = false;
2306
+
2307
+ var camelize = function (string) {
2308
+ return string.replace(hyphenPattern, function (_, character) {
2309
+ return character.toUpperCase();
2310
+ });
2311
+ };
2312
+
2313
+ var warnHyphenatedStyleName = function (name) {
2314
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
2315
+ return;
2316
+ }
2317
+
2318
+ warnedStyleNames[name] = true;
2319
+
2320
+ error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
2321
+ // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
2322
+ // is converted to lowercase `ms`.
2323
+ camelize(name.replace(msPattern$1, 'ms-')));
2324
+ };
2325
+
2326
+ var warnBadVendoredStyleName = function (name) {
2327
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
2328
+ return;
2329
+ }
2330
+
2331
+ warnedStyleNames[name] = true;
2332
+
2333
+ error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
2334
+ };
2335
+
2336
+ var warnStyleValueWithSemicolon = function (name, value) {
2337
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
2338
+ return;
2339
+ }
2340
+
2341
+ warnedStyleValues[value] = true;
2342
+
2343
+ error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
2344
+ };
2345
+
2346
+ var warnStyleValueIsNaN = function (name, value) {
2347
+ if (warnedForNaNValue) {
2348
+ return;
2349
+ }
2350
+
2351
+ warnedForNaNValue = true;
2352
+
2353
+ error('`NaN` is an invalid value for the `%s` css style property.', name);
2354
+ };
2355
+
2356
+ var warnStyleValueIsInfinity = function (name, value) {
2357
+ if (warnedForInfinityValue) {
2358
+ return;
2359
+ }
2360
+
2361
+ warnedForInfinityValue = true;
2362
+
2363
+ error('`Infinity` is an invalid value for the `%s` css style property.', name);
2364
+ };
2365
+
2366
+ warnValidStyle = function (name, value) {
2367
+ if (name.indexOf('-') > -1) {
2368
+ warnHyphenatedStyleName(name);
2369
+ } else if (badVendoredStyleNamePattern.test(name)) {
2370
+ warnBadVendoredStyleName(name);
2371
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
2372
+ warnStyleValueWithSemicolon(name, value);
2373
+ }
2374
+
2375
+ if (typeof value === 'number') {
2376
+ if (isNaN(value)) {
2377
+ warnStyleValueIsNaN(name, value);
2378
+ } else if (!isFinite(value)) {
2379
+ warnStyleValueIsInfinity(name, value);
2380
+ }
2381
+ }
2382
+ };
2383
+ }
2384
+
2385
+ var warnValidStyle$1 = warnValidStyle;
2386
+
2387
+ var ariaProperties = {
2388
+ 'aria-current': 0,
2389
+ // state
2390
+ 'aria-details': 0,
2391
+ 'aria-disabled': 0,
2392
+ // state
2393
+ 'aria-hidden': 0,
2394
+ // state
2395
+ 'aria-invalid': 0,
2396
+ // state
2397
+ 'aria-keyshortcuts': 0,
2398
+ 'aria-label': 0,
2399
+ 'aria-roledescription': 0,
2400
+ // Widget Attributes
2401
+ 'aria-autocomplete': 0,
2402
+ 'aria-checked': 0,
2403
+ 'aria-expanded': 0,
2404
+ 'aria-haspopup': 0,
2405
+ 'aria-level': 0,
2406
+ 'aria-modal': 0,
2407
+ 'aria-multiline': 0,
2408
+ 'aria-multiselectable': 0,
2409
+ 'aria-orientation': 0,
2410
+ 'aria-placeholder': 0,
2411
+ 'aria-pressed': 0,
2412
+ 'aria-readonly': 0,
2413
+ 'aria-required': 0,
2414
+ 'aria-selected': 0,
2415
+ 'aria-sort': 0,
2416
+ 'aria-valuemax': 0,
2417
+ 'aria-valuemin': 0,
2418
+ 'aria-valuenow': 0,
2419
+ 'aria-valuetext': 0,
2420
+ // Live Region Attributes
2421
+ 'aria-atomic': 0,
2422
+ 'aria-busy': 0,
2423
+ 'aria-live': 0,
2424
+ 'aria-relevant': 0,
2425
+ // Drag-and-Drop Attributes
2426
+ 'aria-dropeffect': 0,
2427
+ 'aria-grabbed': 0,
2428
+ // Relationship Attributes
2429
+ 'aria-activedescendant': 0,
2430
+ 'aria-colcount': 0,
2431
+ 'aria-colindex': 0,
2432
+ 'aria-colspan': 0,
2433
+ 'aria-controls': 0,
2434
+ 'aria-describedby': 0,
2435
+ 'aria-errormessage': 0,
2436
+ 'aria-flowto': 0,
2437
+ 'aria-labelledby': 0,
2438
+ 'aria-owns': 0,
2439
+ 'aria-posinset': 0,
2440
+ 'aria-rowcount': 0,
2441
+ 'aria-rowindex': 0,
2442
+ 'aria-rowspan': 0,
2443
+ 'aria-setsize': 0
2444
+ };
2445
+
2446
+ var warnedProperties = {};
2447
+ var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
2448
+ var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
2449
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
2450
+
2451
+ function validateProperty(tagName, name) {
2452
+ {
2453
+ if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
2454
+ return true;
2455
+ }
2456
+
2457
+ if (rARIACamel.test(name)) {
2458
+ var ariaName = 'aria-' + name.slice(4).toLowerCase();
2459
+ var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
2460
+ // DOM properties, then it is an invalid aria-* attribute.
2461
+
2462
+ if (correctName == null) {
2463
+ error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
2464
+
2465
+ warnedProperties[name] = true;
2466
+ return true;
2467
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
2468
+
2469
+
2470
+ if (name !== correctName) {
2471
+ error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
2472
+
2473
+ warnedProperties[name] = true;
2474
+ return true;
2475
+ }
2476
+ }
2477
+
2478
+ if (rARIA.test(name)) {
2479
+ var lowerCasedName = name.toLowerCase();
2480
+ var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
2481
+ // DOM properties, then it is an invalid aria-* attribute.
2482
+
2483
+ if (standardName == null) {
2484
+ warnedProperties[name] = true;
2485
+ return false;
2486
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
2487
+
2488
+
2489
+ if (name !== standardName) {
2490
+ error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
2491
+
2492
+ warnedProperties[name] = true;
2493
+ return true;
2494
+ }
2495
+ }
2496
+ }
2497
+
2498
+ return true;
2499
+ }
2500
+
2501
+ function warnInvalidARIAProps(type, props) {
2502
+ {
2503
+ var invalidProps = [];
2504
+
2505
+ for (var key in props) {
2506
+ var isValid = validateProperty(type, key);
2507
+
2508
+ if (!isValid) {
2509
+ invalidProps.push(key);
2510
+ }
2511
+ }
2512
+
2513
+ var unknownPropString = invalidProps.map(function (prop) {
2514
+ return '`' + prop + '`';
2515
+ }).join(', ');
2516
+
2517
+ if (invalidProps.length === 1) {
2518
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
2519
+ } else if (invalidProps.length > 1) {
2520
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
2521
+ }
2522
+ }
2523
+ }
2524
+
2525
+ function validateProperties(type, props) {
2526
+ if (isCustomComponent(type, props)) {
2527
+ return;
2528
+ }
2529
+
2530
+ warnInvalidARIAProps(type, props);
2531
+ }
2532
+
2533
+ var didWarnValueNull = false;
2534
+ function validateProperties$1(type, props) {
2535
+ {
2536
+ if (type !== 'input' && type !== 'textarea' && type !== 'select') {
2537
+ return;
2538
+ }
2539
+
2540
+ if (props != null && props.value === null && !didWarnValueNull) {
2541
+ didWarnValueNull = true;
2542
+
2543
+ if (type === 'select' && props.multiple) {
2544
+ 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);
2545
+ } else {
2546
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
2547
+ }
2548
+ }
2549
+ }
2550
+ }
2551
+
2552
+ // When adding attributes to the HTML or SVG allowed attribute list, be sure to
2553
+ // also add them to this module to ensure casing and incorrect name
2554
+ // warnings.
2555
+ var possibleStandardNames = {
2556
+ // HTML
2557
+ accept: 'accept',
2558
+ acceptcharset: 'acceptCharset',
2559
+ 'accept-charset': 'acceptCharset',
2560
+ accesskey: 'accessKey',
2561
+ action: 'action',
2562
+ allowfullscreen: 'allowFullScreen',
2563
+ alt: 'alt',
2564
+ as: 'as',
2565
+ async: 'async',
2566
+ autocapitalize: 'autoCapitalize',
2567
+ autocomplete: 'autoComplete',
2568
+ autocorrect: 'autoCorrect',
2569
+ autofocus: 'autoFocus',
2570
+ autoplay: 'autoPlay',
2571
+ autosave: 'autoSave',
2572
+ capture: 'capture',
2573
+ cellpadding: 'cellPadding',
2574
+ cellspacing: 'cellSpacing',
2575
+ challenge: 'challenge',
2576
+ charset: 'charSet',
2577
+ checked: 'checked',
2578
+ children: 'children',
2579
+ cite: 'cite',
2580
+ class: 'className',
2581
+ classid: 'classID',
2582
+ classname: 'className',
2583
+ cols: 'cols',
2584
+ colspan: 'colSpan',
2585
+ content: 'content',
2586
+ contenteditable: 'contentEditable',
2587
+ contextmenu: 'contextMenu',
2588
+ controls: 'controls',
2589
+ controlslist: 'controlsList',
2590
+ coords: 'coords',
2591
+ crossorigin: 'crossOrigin',
2592
+ dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
2593
+ data: 'data',
2594
+ datetime: 'dateTime',
2595
+ default: 'default',
2596
+ defaultchecked: 'defaultChecked',
2597
+ defaultvalue: 'defaultValue',
2598
+ defer: 'defer',
2599
+ dir: 'dir',
2600
+ disabled: 'disabled',
2601
+ disablepictureinpicture: 'disablePictureInPicture',
2602
+ disableremoteplayback: 'disableRemotePlayback',
2603
+ download: 'download',
2604
+ draggable: 'draggable',
2605
+ enctype: 'encType',
2606
+ enterkeyhint: 'enterKeyHint',
2607
+ for: 'htmlFor',
2608
+ form: 'form',
2609
+ formmethod: 'formMethod',
2610
+ formaction: 'formAction',
2611
+ formenctype: 'formEncType',
2612
+ formnovalidate: 'formNoValidate',
2613
+ formtarget: 'formTarget',
2614
+ frameborder: 'frameBorder',
2615
+ headers: 'headers',
2616
+ height: 'height',
2617
+ hidden: 'hidden',
2618
+ high: 'high',
2619
+ href: 'href',
2620
+ hreflang: 'hrefLang',
2621
+ htmlfor: 'htmlFor',
2622
+ httpequiv: 'httpEquiv',
2623
+ 'http-equiv': 'httpEquiv',
2624
+ icon: 'icon',
2625
+ id: 'id',
2626
+ innerhtml: 'innerHTML',
2627
+ inputmode: 'inputMode',
2628
+ integrity: 'integrity',
2629
+ is: 'is',
2630
+ itemid: 'itemID',
2631
+ itemprop: 'itemProp',
2632
+ itemref: 'itemRef',
2633
+ itemscope: 'itemScope',
2634
+ itemtype: 'itemType',
2635
+ keyparams: 'keyParams',
2636
+ keytype: 'keyType',
2637
+ kind: 'kind',
2638
+ label: 'label',
2639
+ lang: 'lang',
2640
+ list: 'list',
2641
+ loop: 'loop',
2642
+ low: 'low',
2643
+ manifest: 'manifest',
2644
+ marginwidth: 'marginWidth',
2645
+ marginheight: 'marginHeight',
2646
+ max: 'max',
2647
+ maxlength: 'maxLength',
2648
+ media: 'media',
2649
+ mediagroup: 'mediaGroup',
2650
+ method: 'method',
2651
+ min: 'min',
2652
+ minlength: 'minLength',
2653
+ multiple: 'multiple',
2654
+ muted: 'muted',
2655
+ name: 'name',
2656
+ nomodule: 'noModule',
2657
+ nonce: 'nonce',
2658
+ novalidate: 'noValidate',
2659
+ open: 'open',
2660
+ optimum: 'optimum',
2661
+ pattern: 'pattern',
2662
+ placeholder: 'placeholder',
2663
+ playsinline: 'playsInline',
2664
+ poster: 'poster',
2665
+ preload: 'preload',
2666
+ profile: 'profile',
2667
+ radiogroup: 'radioGroup',
2668
+ readonly: 'readOnly',
2669
+ referrerpolicy: 'referrerPolicy',
2670
+ rel: 'rel',
2671
+ required: 'required',
2672
+ reversed: 'reversed',
2673
+ role: 'role',
2674
+ rows: 'rows',
2675
+ rowspan: 'rowSpan',
2676
+ sandbox: 'sandbox',
2677
+ scope: 'scope',
2678
+ scoped: 'scoped',
2679
+ scrolling: 'scrolling',
2680
+ seamless: 'seamless',
2681
+ selected: 'selected',
2682
+ shape: 'shape',
2683
+ size: 'size',
2684
+ sizes: 'sizes',
2685
+ span: 'span',
2686
+ spellcheck: 'spellCheck',
2687
+ src: 'src',
2688
+ srcdoc: 'srcDoc',
2689
+ srclang: 'srcLang',
2690
+ srcset: 'srcSet',
2691
+ start: 'start',
2692
+ step: 'step',
2693
+ style: 'style',
2694
+ summary: 'summary',
2695
+ tabindex: 'tabIndex',
2696
+ target: 'target',
2697
+ title: 'title',
2698
+ type: 'type',
2699
+ usemap: 'useMap',
2700
+ value: 'value',
2701
+ width: 'width',
2702
+ wmode: 'wmode',
2703
+ wrap: 'wrap',
2704
+ // SVG
2705
+ about: 'about',
2706
+ accentheight: 'accentHeight',
2707
+ 'accent-height': 'accentHeight',
2708
+ accumulate: 'accumulate',
2709
+ additive: 'additive',
2710
+ alignmentbaseline: 'alignmentBaseline',
2711
+ 'alignment-baseline': 'alignmentBaseline',
2712
+ allowreorder: 'allowReorder',
2713
+ alphabetic: 'alphabetic',
2714
+ amplitude: 'amplitude',
2715
+ arabicform: 'arabicForm',
2716
+ 'arabic-form': 'arabicForm',
2717
+ ascent: 'ascent',
2718
+ attributename: 'attributeName',
2719
+ attributetype: 'attributeType',
2720
+ autoreverse: 'autoReverse',
2721
+ azimuth: 'azimuth',
2722
+ basefrequency: 'baseFrequency',
2723
+ baselineshift: 'baselineShift',
2724
+ 'baseline-shift': 'baselineShift',
2725
+ baseprofile: 'baseProfile',
2726
+ bbox: 'bbox',
2727
+ begin: 'begin',
2728
+ bias: 'bias',
2729
+ by: 'by',
2730
+ calcmode: 'calcMode',
2731
+ capheight: 'capHeight',
2732
+ 'cap-height': 'capHeight',
2733
+ clip: 'clip',
2734
+ clippath: 'clipPath',
2735
+ 'clip-path': 'clipPath',
2736
+ clippathunits: 'clipPathUnits',
2737
+ cliprule: 'clipRule',
2738
+ 'clip-rule': 'clipRule',
2739
+ color: 'color',
2740
+ colorinterpolation: 'colorInterpolation',
2741
+ 'color-interpolation': 'colorInterpolation',
2742
+ colorinterpolationfilters: 'colorInterpolationFilters',
2743
+ 'color-interpolation-filters': 'colorInterpolationFilters',
2744
+ colorprofile: 'colorProfile',
2745
+ 'color-profile': 'colorProfile',
2746
+ colorrendering: 'colorRendering',
2747
+ 'color-rendering': 'colorRendering',
2748
+ contentscripttype: 'contentScriptType',
2749
+ contentstyletype: 'contentStyleType',
2750
+ cursor: 'cursor',
2751
+ cx: 'cx',
2752
+ cy: 'cy',
2753
+ d: 'd',
2754
+ datatype: 'datatype',
2755
+ decelerate: 'decelerate',
2756
+ descent: 'descent',
2757
+ diffuseconstant: 'diffuseConstant',
2758
+ direction: 'direction',
2759
+ display: 'display',
2760
+ divisor: 'divisor',
2761
+ dominantbaseline: 'dominantBaseline',
2762
+ 'dominant-baseline': 'dominantBaseline',
2763
+ dur: 'dur',
2764
+ dx: 'dx',
2765
+ dy: 'dy',
2766
+ edgemode: 'edgeMode',
2767
+ elevation: 'elevation',
2768
+ enablebackground: 'enableBackground',
2769
+ 'enable-background': 'enableBackground',
2770
+ end: 'end',
2771
+ exponent: 'exponent',
2772
+ externalresourcesrequired: 'externalResourcesRequired',
2773
+ fill: 'fill',
2774
+ fillopacity: 'fillOpacity',
2775
+ 'fill-opacity': 'fillOpacity',
2776
+ fillrule: 'fillRule',
2777
+ 'fill-rule': 'fillRule',
2778
+ filter: 'filter',
2779
+ filterres: 'filterRes',
2780
+ filterunits: 'filterUnits',
2781
+ floodopacity: 'floodOpacity',
2782
+ 'flood-opacity': 'floodOpacity',
2783
+ floodcolor: 'floodColor',
2784
+ 'flood-color': 'floodColor',
2785
+ focusable: 'focusable',
2786
+ fontfamily: 'fontFamily',
2787
+ 'font-family': 'fontFamily',
2788
+ fontsize: 'fontSize',
2789
+ 'font-size': 'fontSize',
2790
+ fontsizeadjust: 'fontSizeAdjust',
2791
+ 'font-size-adjust': 'fontSizeAdjust',
2792
+ fontstretch: 'fontStretch',
2793
+ 'font-stretch': 'fontStretch',
2794
+ fontstyle: 'fontStyle',
2795
+ 'font-style': 'fontStyle',
2796
+ fontvariant: 'fontVariant',
2797
+ 'font-variant': 'fontVariant',
2798
+ fontweight: 'fontWeight',
2799
+ 'font-weight': 'fontWeight',
2800
+ format: 'format',
2801
+ from: 'from',
2802
+ fx: 'fx',
2803
+ fy: 'fy',
2804
+ g1: 'g1',
2805
+ g2: 'g2',
2806
+ glyphname: 'glyphName',
2807
+ 'glyph-name': 'glyphName',
2808
+ glyphorientationhorizontal: 'glyphOrientationHorizontal',
2809
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
2810
+ glyphorientationvertical: 'glyphOrientationVertical',
2811
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
2812
+ glyphref: 'glyphRef',
2813
+ gradienttransform: 'gradientTransform',
2814
+ gradientunits: 'gradientUnits',
2815
+ hanging: 'hanging',
2816
+ horizadvx: 'horizAdvX',
2817
+ 'horiz-adv-x': 'horizAdvX',
2818
+ horizoriginx: 'horizOriginX',
2819
+ 'horiz-origin-x': 'horizOriginX',
2820
+ ideographic: 'ideographic',
2821
+ imagerendering: 'imageRendering',
2822
+ 'image-rendering': 'imageRendering',
2823
+ in2: 'in2',
2824
+ in: 'in',
2825
+ inlist: 'inlist',
2826
+ intercept: 'intercept',
2827
+ k1: 'k1',
2828
+ k2: 'k2',
2829
+ k3: 'k3',
2830
+ k4: 'k4',
2831
+ k: 'k',
2832
+ kernelmatrix: 'kernelMatrix',
2833
+ kernelunitlength: 'kernelUnitLength',
2834
+ kerning: 'kerning',
2835
+ keypoints: 'keyPoints',
2836
+ keysplines: 'keySplines',
2837
+ keytimes: 'keyTimes',
2838
+ lengthadjust: 'lengthAdjust',
2839
+ letterspacing: 'letterSpacing',
2840
+ 'letter-spacing': 'letterSpacing',
2841
+ lightingcolor: 'lightingColor',
2842
+ 'lighting-color': 'lightingColor',
2843
+ limitingconeangle: 'limitingConeAngle',
2844
+ local: 'local',
2845
+ markerend: 'markerEnd',
2846
+ 'marker-end': 'markerEnd',
2847
+ markerheight: 'markerHeight',
2848
+ markermid: 'markerMid',
2849
+ 'marker-mid': 'markerMid',
2850
+ markerstart: 'markerStart',
2851
+ 'marker-start': 'markerStart',
2852
+ markerunits: 'markerUnits',
2853
+ markerwidth: 'markerWidth',
2854
+ mask: 'mask',
2855
+ maskcontentunits: 'maskContentUnits',
2856
+ maskunits: 'maskUnits',
2857
+ mathematical: 'mathematical',
2858
+ mode: 'mode',
2859
+ numoctaves: 'numOctaves',
2860
+ offset: 'offset',
2861
+ opacity: 'opacity',
2862
+ operator: 'operator',
2863
+ order: 'order',
2864
+ orient: 'orient',
2865
+ orientation: 'orientation',
2866
+ origin: 'origin',
2867
+ overflow: 'overflow',
2868
+ overlineposition: 'overlinePosition',
2869
+ 'overline-position': 'overlinePosition',
2870
+ overlinethickness: 'overlineThickness',
2871
+ 'overline-thickness': 'overlineThickness',
2872
+ paintorder: 'paintOrder',
2873
+ 'paint-order': 'paintOrder',
2874
+ panose1: 'panose1',
2875
+ 'panose-1': 'panose1',
2876
+ pathlength: 'pathLength',
2877
+ patterncontentunits: 'patternContentUnits',
2878
+ patterntransform: 'patternTransform',
2879
+ patternunits: 'patternUnits',
2880
+ pointerevents: 'pointerEvents',
2881
+ 'pointer-events': 'pointerEvents',
2882
+ points: 'points',
2883
+ pointsatx: 'pointsAtX',
2884
+ pointsaty: 'pointsAtY',
2885
+ pointsatz: 'pointsAtZ',
2886
+ prefix: 'prefix',
2887
+ preservealpha: 'preserveAlpha',
2888
+ preserveaspectratio: 'preserveAspectRatio',
2889
+ primitiveunits: 'primitiveUnits',
2890
+ property: 'property',
2891
+ r: 'r',
2892
+ radius: 'radius',
2893
+ refx: 'refX',
2894
+ refy: 'refY',
2895
+ renderingintent: 'renderingIntent',
2896
+ 'rendering-intent': 'renderingIntent',
2897
+ repeatcount: 'repeatCount',
2898
+ repeatdur: 'repeatDur',
2899
+ requiredextensions: 'requiredExtensions',
2900
+ requiredfeatures: 'requiredFeatures',
2901
+ resource: 'resource',
2902
+ restart: 'restart',
2903
+ result: 'result',
2904
+ results: 'results',
2905
+ rotate: 'rotate',
2906
+ rx: 'rx',
2907
+ ry: 'ry',
2908
+ scale: 'scale',
2909
+ security: 'security',
2910
+ seed: 'seed',
2911
+ shaperendering: 'shapeRendering',
2912
+ 'shape-rendering': 'shapeRendering',
2913
+ slope: 'slope',
2914
+ spacing: 'spacing',
2915
+ specularconstant: 'specularConstant',
2916
+ specularexponent: 'specularExponent',
2917
+ speed: 'speed',
2918
+ spreadmethod: 'spreadMethod',
2919
+ startoffset: 'startOffset',
2920
+ stddeviation: 'stdDeviation',
2921
+ stemh: 'stemh',
2922
+ stemv: 'stemv',
2923
+ stitchtiles: 'stitchTiles',
2924
+ stopcolor: 'stopColor',
2925
+ 'stop-color': 'stopColor',
2926
+ stopopacity: 'stopOpacity',
2927
+ 'stop-opacity': 'stopOpacity',
2928
+ strikethroughposition: 'strikethroughPosition',
2929
+ 'strikethrough-position': 'strikethroughPosition',
2930
+ strikethroughthickness: 'strikethroughThickness',
2931
+ 'strikethrough-thickness': 'strikethroughThickness',
2932
+ string: 'string',
2933
+ stroke: 'stroke',
2934
+ strokedasharray: 'strokeDasharray',
2935
+ 'stroke-dasharray': 'strokeDasharray',
2936
+ strokedashoffset: 'strokeDashoffset',
2937
+ 'stroke-dashoffset': 'strokeDashoffset',
2938
+ strokelinecap: 'strokeLinecap',
2939
+ 'stroke-linecap': 'strokeLinecap',
2940
+ strokelinejoin: 'strokeLinejoin',
2941
+ 'stroke-linejoin': 'strokeLinejoin',
2942
+ strokemiterlimit: 'strokeMiterlimit',
2943
+ 'stroke-miterlimit': 'strokeMiterlimit',
2944
+ strokewidth: 'strokeWidth',
2945
+ 'stroke-width': 'strokeWidth',
2946
+ strokeopacity: 'strokeOpacity',
2947
+ 'stroke-opacity': 'strokeOpacity',
2948
+ suppresscontenteditablewarning: 'suppressContentEditableWarning',
2949
+ suppresshydrationwarning: 'suppressHydrationWarning',
2950
+ surfacescale: 'surfaceScale',
2951
+ systemlanguage: 'systemLanguage',
2952
+ tablevalues: 'tableValues',
2953
+ targetx: 'targetX',
2954
+ targety: 'targetY',
2955
+ textanchor: 'textAnchor',
2956
+ 'text-anchor': 'textAnchor',
2957
+ textdecoration: 'textDecoration',
2958
+ 'text-decoration': 'textDecoration',
2959
+ textlength: 'textLength',
2960
+ textrendering: 'textRendering',
2961
+ 'text-rendering': 'textRendering',
2962
+ to: 'to',
2963
+ transform: 'transform',
2964
+ typeof: 'typeof',
2965
+ u1: 'u1',
2966
+ u2: 'u2',
2967
+ underlineposition: 'underlinePosition',
2968
+ 'underline-position': 'underlinePosition',
2969
+ underlinethickness: 'underlineThickness',
2970
+ 'underline-thickness': 'underlineThickness',
2971
+ unicode: 'unicode',
2972
+ unicodebidi: 'unicodeBidi',
2973
+ 'unicode-bidi': 'unicodeBidi',
2974
+ unicoderange: 'unicodeRange',
2975
+ 'unicode-range': 'unicodeRange',
2976
+ unitsperem: 'unitsPerEm',
2977
+ 'units-per-em': 'unitsPerEm',
2978
+ unselectable: 'unselectable',
2979
+ valphabetic: 'vAlphabetic',
2980
+ 'v-alphabetic': 'vAlphabetic',
2981
+ values: 'values',
2982
+ vectoreffect: 'vectorEffect',
2983
+ 'vector-effect': 'vectorEffect',
2984
+ version: 'version',
2985
+ vertadvy: 'vertAdvY',
2986
+ 'vert-adv-y': 'vertAdvY',
2987
+ vertoriginx: 'vertOriginX',
2988
+ 'vert-origin-x': 'vertOriginX',
2989
+ vertoriginy: 'vertOriginY',
2990
+ 'vert-origin-y': 'vertOriginY',
2991
+ vhanging: 'vHanging',
2992
+ 'v-hanging': 'vHanging',
2993
+ videographic: 'vIdeographic',
2994
+ 'v-ideographic': 'vIdeographic',
2995
+ viewbox: 'viewBox',
2996
+ viewtarget: 'viewTarget',
2997
+ visibility: 'visibility',
2998
+ vmathematical: 'vMathematical',
2999
+ 'v-mathematical': 'vMathematical',
3000
+ vocab: 'vocab',
3001
+ widths: 'widths',
3002
+ wordspacing: 'wordSpacing',
3003
+ 'word-spacing': 'wordSpacing',
3004
+ writingmode: 'writingMode',
3005
+ 'writing-mode': 'writingMode',
3006
+ x1: 'x1',
3007
+ x2: 'x2',
3008
+ x: 'x',
3009
+ xchannelselector: 'xChannelSelector',
3010
+ xheight: 'xHeight',
3011
+ 'x-height': 'xHeight',
3012
+ xlinkactuate: 'xlinkActuate',
3013
+ 'xlink:actuate': 'xlinkActuate',
3014
+ xlinkarcrole: 'xlinkArcrole',
3015
+ 'xlink:arcrole': 'xlinkArcrole',
3016
+ xlinkhref: 'xlinkHref',
3017
+ 'xlink:href': 'xlinkHref',
3018
+ xlinkrole: 'xlinkRole',
3019
+ 'xlink:role': 'xlinkRole',
3020
+ xlinkshow: 'xlinkShow',
3021
+ 'xlink:show': 'xlinkShow',
3022
+ xlinktitle: 'xlinkTitle',
3023
+ 'xlink:title': 'xlinkTitle',
3024
+ xlinktype: 'xlinkType',
3025
+ 'xlink:type': 'xlinkType',
3026
+ xmlbase: 'xmlBase',
3027
+ 'xml:base': 'xmlBase',
3028
+ xmllang: 'xmlLang',
3029
+ 'xml:lang': 'xmlLang',
3030
+ xmlns: 'xmlns',
3031
+ 'xml:space': 'xmlSpace',
3032
+ xmlnsxlink: 'xmlnsXlink',
3033
+ 'xmlns:xlink': 'xmlnsXlink',
3034
+ xmlspace: 'xmlSpace',
3035
+ y1: 'y1',
3036
+ y2: 'y2',
3037
+ y: 'y',
3038
+ ychannelselector: 'yChannelSelector',
3039
+ z: 'z',
3040
+ zoomandpan: 'zoomAndPan'
3041
+ };
3042
+
3043
+ var validateProperty$1 = function () {};
3044
+
3045
+ {
3046
+ var warnedProperties$1 = {};
3047
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
3048
+ var EVENT_NAME_REGEX = /^on./;
3049
+ var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
3050
+ var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
3051
+ var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
3052
+
3053
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
3054
+ if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
3055
+ return true;
3056
+ }
3057
+
3058
+ var lowerCasedName = name.toLowerCase();
3059
+
3060
+ if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
3061
+ 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.');
3062
+
3063
+ warnedProperties$1[name] = true;
3064
+ return true;
3065
+ } // We can't rely on the event system being injected on the server.
3066
+
3067
+
3068
+ if (eventRegistry != null) {
3069
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
3070
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
3071
+
3072
+ if (registrationNameDependencies.hasOwnProperty(name)) {
3073
+ return true;
3074
+ }
3075
+
3076
+ var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
3077
+
3078
+ if (registrationName != null) {
3079
+ error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
3080
+
3081
+ warnedProperties$1[name] = true;
3082
+ return true;
3083
+ }
3084
+
3085
+ if (EVENT_NAME_REGEX.test(name)) {
3086
+ error('Unknown event handler property `%s`. It will be ignored.', name);
3087
+
3088
+ warnedProperties$1[name] = true;
3089
+ return true;
3090
+ }
3091
+ } else if (EVENT_NAME_REGEX.test(name)) {
3092
+ // If no event plugins have been injected, we are in a server environment.
3093
+ // So we can't tell if the event name is correct for sure, but we can filter
3094
+ // out known bad ones like `onclick`. We can't suggest a specific replacement though.
3095
+ if (INVALID_EVENT_NAME_REGEX.test(name)) {
3096
+ error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
3097
+ }
3098
+
3099
+ warnedProperties$1[name] = true;
3100
+ return true;
3101
+ } // Let the ARIA attribute hook validate ARIA attributes
3102
+
3103
+
3104
+ if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
3105
+ return true;
3106
+ }
3107
+
3108
+ if (lowerCasedName === 'innerhtml') {
3109
+ error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
3110
+
3111
+ warnedProperties$1[name] = true;
3112
+ return true;
3113
+ }
3114
+
3115
+ if (lowerCasedName === 'aria') {
3116
+ error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
3117
+
3118
+ warnedProperties$1[name] = true;
3119
+ return true;
3120
+ }
3121
+
3122
+ if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
3123
+ error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
3124
+
3125
+ warnedProperties$1[name] = true;
3126
+ return true;
3127
+ }
3128
+
3129
+ if (typeof value === 'number' && isNaN(value)) {
3130
+ error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
3131
+
3132
+ warnedProperties$1[name] = true;
3133
+ return true;
3134
+ }
3135
+
3136
+ var propertyInfo = getPropertyInfo(name);
3137
+ var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
3138
+
3139
+ if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
3140
+ var standardName = possibleStandardNames[lowerCasedName];
3141
+
3142
+ if (standardName !== name) {
3143
+ error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
3144
+
3145
+ warnedProperties$1[name] = true;
3146
+ return true;
3147
+ }
3148
+ } else if (!isReserved && name !== lowerCasedName) {
3149
+ // Unknown attributes should have lowercase casing since that's how they
3150
+ // will be cased anyway with server rendering.
3151
+ 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);
3152
+
3153
+ warnedProperties$1[name] = true;
3154
+ return true;
3155
+ }
3156
+
3157
+ if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
3158
+ if (value) {
3159
+ 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);
3160
+ } else {
3161
+ 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);
3162
+ }
3163
+
3164
+ warnedProperties$1[name] = true;
3165
+ return true;
3166
+ } // Now that we've validated casing, do not validate
3167
+ // data types for reserved props
3168
+
3169
+
3170
+ if (isReserved) {
3171
+ return true;
3172
+ } // Warn when a known attribute is a bad type
3173
+
3174
+
3175
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
3176
+ warnedProperties$1[name] = true;
3177
+ return false;
3178
+ } // Warn when passing the strings 'false' or 'true' into a boolean prop
3179
+
3180
+
3181
+ if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
3182
+ 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);
3183
+
3184
+ warnedProperties$1[name] = true;
3185
+ return true;
3186
+ }
3187
+
3188
+ return true;
3189
+ };
3190
+ }
3191
+
3192
+ var warnUnknownProperties = function (type, props, eventRegistry) {
3193
+ {
3194
+ var unknownProps = [];
3195
+
3196
+ for (var key in props) {
3197
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
3198
+
3199
+ if (!isValid) {
3200
+ unknownProps.push(key);
3201
+ }
3202
+ }
3203
+
3204
+ var unknownPropString = unknownProps.map(function (prop) {
3205
+ return '`' + prop + '`';
3206
+ }).join(', ');
3207
+
3208
+ if (unknownProps.length === 1) {
3209
+ 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://reactjs.org/link/attribute-behavior ', unknownPropString, type);
3210
+ } else if (unknownProps.length > 1) {
3211
+ 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://reactjs.org/link/attribute-behavior ', unknownPropString, type);
3212
+ }
3213
+ }
3214
+ };
3215
+
3216
+ function validateProperties$2(type, props, eventRegistry) {
3217
+ if (isCustomComponent(type, props)) {
3218
+ return;
3219
+ }
3220
+
3221
+ warnUnknownProperties(type, props, eventRegistry);
3222
+ }
3223
+
3224
+ var toArray = React$1.Children.toArray; // This is only used in DEV.
3225
+ // Each entry is `this.stack` from a currently executing renderer instance.
3226
+ // (There may be more than one because ReactDOMServer is reentrant).
3227
+ // Each stack is an array of frames which may contain nested stacks of elements.
3228
+
3229
+ var currentDebugStacks = [];
3230
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
3231
+ var ReactDebugCurrentFrame$1;
3232
+ var prevGetCurrentStackImpl = null;
3233
+
3234
+ var getCurrentServerStackImpl = function () {
3235
+ return '';
3236
+ };
3237
+
3238
+ var describeStackFrame = function (element) {
3239
+ return '';
3240
+ };
3241
+
3242
+ var validatePropertiesInDevelopment = function (type, props) {};
3243
+
3244
+ var pushCurrentDebugStack = function (stack) {};
3245
+
3246
+ var pushElementToDebugStack = function (element) {};
3247
+
3248
+ var popCurrentDebugStack = function () {};
3249
+
3250
+ var hasWarnedAboutUsingContextAsConsumer = false;
3251
+
3252
+ {
3253
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
3254
+
3255
+ validatePropertiesInDevelopment = function (type, props) {
3256
+ validateProperties(type, props);
3257
+ validateProperties$1(type, props);
3258
+ validateProperties$2(type, props, null);
3259
+ };
3260
+
3261
+ describeStackFrame = function (element) {
3262
+ return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
3263
+ };
3264
+
3265
+ pushCurrentDebugStack = function (stack) {
3266
+ currentDebugStacks.push(stack);
3267
+
3268
+ if (currentDebugStacks.length === 1) {
3269
+ // We are entering a server renderer.
3270
+ // Remember the previous (e.g. client) global stack implementation.
3271
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
3272
+ ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
3273
+ }
3274
+ };
3275
+
3276
+ pushElementToDebugStack = function (element) {
3277
+ // For the innermost executing ReactDOMServer call,
3278
+ var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>),
3279
+
3280
+ var frame = stack[stack.length - 1]; // and record that it has one more element associated with it.
3281
+
3282
+ frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element
3283
+ // children and directly handle them in an inner loop instead of
3284
+ // creating separate frames for them.
3285
+ };
3286
+
3287
+ popCurrentDebugStack = function () {
3288
+ currentDebugStacks.pop();
3289
+
3290
+ if (currentDebugStacks.length === 0) {
3291
+ // We are exiting the server renderer.
3292
+ // Restore the previous (e.g. client) global stack implementation.
3293
+ ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
3294
+ prevGetCurrentStackImpl = null;
3295
+ }
3296
+ };
3297
+
3298
+ getCurrentServerStackImpl = function () {
3299
+ if (currentDebugStacks.length === 0) {
3300
+ // Nothing is currently rendering.
3301
+ return '';
3302
+ } // ReactDOMServer is reentrant so there may be multiple calls at the same time.
3303
+ // Take the frames from the innermost call which is the last in the array.
3304
+
3305
+
3306
+ var frames = currentDebugStacks[currentDebugStacks.length - 1];
3307
+ var stack = ''; // Go through every frame in the stack from the innermost one.
3308
+
3309
+ for (var i = frames.length - 1; i >= 0; i--) {
3310
+ var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it.
3311
+ // This is because single-child nesting doesn't create materialized frames.
3312
+ // Instead it would push them through `pushElementToDebugStack()`.
3313
+
3314
+ var debugElementStack = frame.debugElementStack;
3315
+
3316
+ for (var ii = debugElementStack.length - 1; ii >= 0; ii--) {
3317
+ stack += describeStackFrame(debugElementStack[ii]);
3318
+ }
3319
+ }
3320
+
3321
+ return stack;
3322
+ };
3323
+ }
3324
+
3325
+ var didWarnDefaultInputValue = false;
3326
+ var didWarnDefaultChecked = false;
3327
+ var didWarnDefaultSelectValue = false;
3328
+ var didWarnDefaultTextareaValue = false;
3329
+ var didWarnInvalidOptionChildren = false;
3330
+ var didWarnAboutNoopUpdateForComponent = {};
3331
+ var didWarnAboutBadClass = {};
3332
+ var didWarnAboutModulePatternComponent = {};
3333
+ var didWarnAboutDeprecatedWillMount = {};
3334
+ var didWarnAboutUndefinedDerivedState = {};
3335
+ var didWarnAboutUninitializedState = {};
3336
+ var valuePropNames = ['value', 'defaultValue'];
3337
+ var newlineEatingTags = {
3338
+ listing: true,
3339
+ pre: true,
3340
+ textarea: true
3341
+ }; // We accept any tag to be rendered but since this gets injected into arbitrary
3342
+ // HTML, we want to make sure that it's a safe tag.
3343
+ // http://www.w3.org/TR/REC-xml/#NT-Name
3344
+
3345
+ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
3346
+
3347
+ var validatedTagCache = {};
3348
+
3349
+ function validateDangerousTag(tag) {
3350
+ if (!validatedTagCache.hasOwnProperty(tag)) {
3351
+ if (!VALID_TAG_REGEX.test(tag)) {
3352
+ {
3353
+ throw Error( "Invalid tag: " + tag );
3354
+ }
3355
+ }
3356
+
3357
+ validatedTagCache[tag] = true;
3358
+ }
3359
+ }
3360
+
3361
+ var styleNameCache = {};
3362
+
3363
+ var processStyleName = function (styleName) {
3364
+ if (styleNameCache.hasOwnProperty(styleName)) {
3365
+ return styleNameCache[styleName];
3366
+ }
3367
+
3368
+ var result = hyphenateStyleName(styleName);
3369
+ styleNameCache[styleName] = result;
3370
+ return result;
3371
+ };
3372
+
3373
+ function createMarkupForStyles(styles) {
3374
+ var serialized = '';
3375
+ var delimiter = '';
3376
+
3377
+ for (var styleName in styles) {
3378
+ if (!styles.hasOwnProperty(styleName)) {
3379
+ continue;
3380
+ }
3381
+
3382
+ var isCustomProperty = styleName.indexOf('--') === 0;
3383
+ var styleValue = styles[styleName];
3384
+
3385
+ {
3386
+ if (!isCustomProperty) {
3387
+ warnValidStyle$1(styleName, styleValue);
3388
+ }
3389
+ }
3390
+
3391
+ if (styleValue != null) {
3392
+ serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
3393
+ serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
3394
+ delimiter = ';';
3395
+ }
3396
+ }
3397
+
3398
+ return serialized || null;
3399
+ }
3400
+
3401
+ function warnNoop(publicInstance, callerName) {
3402
+ {
3403
+ var _constructor = publicInstance.constructor;
3404
+ var componentName = _constructor && getComponentName(_constructor) || 'ReactClass';
3405
+ var warningKey = componentName + '.' + callerName;
3406
+
3407
+ if (didWarnAboutNoopUpdateForComponent[warningKey]) {
3408
+ return;
3409
+ }
3410
+
3411
+ 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);
3412
+
3413
+ didWarnAboutNoopUpdateForComponent[warningKey] = true;
3414
+ }
3415
+ }
3416
+
3417
+ function shouldConstruct$1(Component) {
3418
+ return Component.prototype && Component.prototype.isReactComponent;
3419
+ }
3420
+
3421
+ function getNonChildrenInnerMarkup(props) {
3422
+ var innerHTML = props.dangerouslySetInnerHTML;
3423
+
3424
+ if (innerHTML != null) {
3425
+ if (innerHTML.__html != null) {
3426
+ return innerHTML.__html;
3427
+ }
3428
+ } else {
3429
+ var content = props.children;
3430
+
3431
+ if (typeof content === 'string' || typeof content === 'number') {
3432
+ return escapeTextForBrowser(content);
3433
+ }
3434
+ }
3435
+
3436
+ return null;
3437
+ }
3438
+
3439
+ function flattenTopLevelChildren(children) {
3440
+ if (!React$1.isValidElement(children)) {
3441
+ return toArray(children);
3442
+ }
3443
+
3444
+ var element = children;
3445
+
3446
+ if (element.type !== REACT_FRAGMENT_TYPE) {
3447
+ return [element];
3448
+ }
3449
+
3450
+ var fragmentChildren = element.props.children;
3451
+
3452
+ if (!React$1.isValidElement(fragmentChildren)) {
3453
+ return toArray(fragmentChildren);
3454
+ }
3455
+
3456
+ var fragmentChildElement = fragmentChildren;
3457
+ return [fragmentChildElement];
3458
+ }
3459
+
3460
+ function flattenOptionChildren(children) {
3461
+ if (children === undefined || children === null) {
3462
+ return children;
3463
+ }
3464
+
3465
+ var content = ''; // Flatten children and warn if they aren't strings or numbers;
3466
+ // invalid types are ignored.
3467
+
3468
+ React$1.Children.forEach(children, function (child) {
3469
+ if (child == null) {
3470
+ return;
3471
+ }
3472
+
3473
+ content += child;
3474
+
3475
+ {
3476
+ if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
3477
+ didWarnInvalidOptionChildren = true;
3478
+
3479
+ error('Only strings and numbers are supported as <option> children.');
3480
+ }
3481
+ }
3482
+ });
3483
+ return content;
3484
+ }
3485
+
3486
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
3487
+ var STYLE = 'style';
3488
+ var RESERVED_PROPS = {
3489
+ children: null,
3490
+ dangerouslySetInnerHTML: null,
3491
+ suppressContentEditableWarning: null,
3492
+ suppressHydrationWarning: null
3493
+ };
3494
+
3495
+ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
3496
+ var ret = '<' + tagVerbatim;
3497
+ var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
3498
+
3499
+ for (var propKey in props) {
3500
+ if (!hasOwnProperty$2.call(props, propKey)) {
3501
+ continue;
3502
+ }
3503
+
3504
+ var propValue = props[propKey];
3505
+
3506
+ if (propValue == null) {
3507
+ continue;
3508
+ }
3509
+
3510
+ if (propKey === STYLE) {
3511
+ propValue = createMarkupForStyles(propValue);
3512
+ }
3513
+
3514
+ var markup = null;
3515
+
3516
+ if (isCustomComponent$1) {
3517
+ if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
3518
+ markup = createMarkupForCustomAttribute(propKey, propValue);
3519
+ }
3520
+ } else {
3521
+ markup = createMarkupForProperty(propKey, propValue);
3522
+ }
3523
+
3524
+ if (markup) {
3525
+ ret += ' ' + markup;
3526
+ }
3527
+ } // For static pages, no need to put React ID and checksum. Saves lots of
3528
+ // bytes.
3529
+
3530
+
3531
+ if (makeStaticMarkup) {
3532
+ return ret;
3533
+ }
3534
+
3535
+ if (isRootElement) {
3536
+ ret += ' ' + createMarkupForRoot();
3537
+ }
3538
+
3539
+ return ret;
3540
+ }
3541
+
3542
+ function validateRenderResult(child, type) {
3543
+ if (child === undefined) {
3544
+ {
3545
+ {
3546
+ throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
3547
+ }
3548
+ }
3549
+ }
3550
+ }
3551
+
3552
+ function resolve(child, context, threadID) {
3553
+ while (React$1.isValidElement(child)) {
3554
+ // Safe because we just checked it's an element.
3555
+ var element = child;
3556
+ var Component = element.type;
3557
+
3558
+ {
3559
+ pushElementToDebugStack(element);
3560
+ }
3561
+
3562
+ if (typeof Component !== 'function') {
3563
+ break;
3564
+ }
3565
+
3566
+ processChild(element, Component);
3567
+ } // Extra closure so queue and replace can be captured properly
3568
+
3569
+
3570
+ function processChild(element, Component) {
3571
+ var isClass = shouldConstruct$1(Component);
3572
+ var publicContext = processContext(Component, context, threadID, isClass);
3573
+ var queue = [];
3574
+ var replace = false;
3575
+ var updater = {
3576
+ isMounted: function (publicInstance) {
3577
+ return false;
3578
+ },
3579
+ enqueueForceUpdate: function (publicInstance) {
3580
+ if (queue === null) {
3581
+ warnNoop(publicInstance, 'forceUpdate');
3582
+ return null;
3583
+ }
3584
+ },
3585
+ enqueueReplaceState: function (publicInstance, completeState) {
3586
+ replace = true;
3587
+ queue = [completeState];
3588
+ },
3589
+ enqueueSetState: function (publicInstance, currentPartialState) {
3590
+ if (queue === null) {
3591
+ warnNoop(publicInstance, 'setState');
3592
+ return null;
3593
+ }
3594
+
3595
+ queue.push(currentPartialState);
3596
+ }
3597
+ };
3598
+ var inst;
3599
+
3600
+ if (isClass) {
3601
+ inst = new Component(element.props, publicContext, updater);
3602
+
3603
+ if (typeof Component.getDerivedStateFromProps === 'function') {
3604
+ {
3605
+ if (inst.state === null || inst.state === undefined) {
3606
+ var componentName = getComponentName(Component) || 'Unknown';
3607
+
3608
+ if (!didWarnAboutUninitializedState[componentName]) {
3609
+ 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);
3610
+
3611
+ didWarnAboutUninitializedState[componentName] = true;
3612
+ }
3613
+ }
3614
+ }
3615
+
3616
+ var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state);
3617
+
3618
+ {
3619
+ if (partialState === undefined) {
3620
+ var _componentName = getComponentName(Component) || 'Unknown';
3621
+
3622
+ if (!didWarnAboutUndefinedDerivedState[_componentName]) {
3623
+ error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
3624
+
3625
+ didWarnAboutUndefinedDerivedState[_componentName] = true;
3626
+ }
3627
+ }
3628
+ }
3629
+
3630
+ if (partialState != null) {
3631
+ inst.state = _assign({}, inst.state, partialState);
3632
+ }
3633
+ }
3634
+ } else {
3635
+ {
3636
+ if (Component.prototype && typeof Component.prototype.render === 'function') {
3637
+ var _componentName2 = getComponentName(Component) || 'Unknown';
3638
+
3639
+ if (!didWarnAboutBadClass[_componentName2]) {
3640
+ 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);
3641
+
3642
+ didWarnAboutBadClass[_componentName2] = true;
3643
+ }
3644
+ }
3645
+ }
3646
+
3647
+ var componentIdentity = {};
3648
+ prepareToUseHooks(componentIdentity);
3649
+ inst = Component(element.props, publicContext, updater);
3650
+ inst = finishHooks(Component, element.props, inst, publicContext);
3651
+
3652
+ {
3653
+ // Support for module components is deprecated and is removed behind a flag.
3654
+ // Whether or not it would crash later, we want to show a good message in DEV first.
3655
+ if (inst != null && inst.render != null) {
3656
+ var _componentName3 = getComponentName(Component) || 'Unknown';
3657
+
3658
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
3659
+ 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);
3660
+
3661
+ didWarnAboutModulePatternComponent[_componentName3] = true;
3662
+ }
3663
+ }
3664
+ } // If the flag is on, everything is assumed to be a function component.
3665
+ // Otherwise, we also do the unfortunate dynamic checks.
3666
+
3667
+
3668
+ if ( inst == null || inst.render == null) {
3669
+ child = inst;
3670
+ validateRenderResult(child, Component);
3671
+ return;
3672
+ }
3673
+ }
3674
+
3675
+ inst.props = element.props;
3676
+ inst.context = publicContext;
3677
+ inst.updater = updater;
3678
+ var initialState = inst.state;
3679
+
3680
+ if (initialState === undefined) {
3681
+ inst.state = initialState = null;
3682
+ }
3683
+
3684
+ if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
3685
+ if (typeof inst.componentWillMount === 'function') {
3686
+ {
3687
+ if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
3688
+ var _componentName4 = getComponentName(Component) || 'Unknown';
3689
+
3690
+ if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
3691
+ warn( // keep this warning in sync with ReactStrictModeWarning.js
3692
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/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);
3693
+
3694
+ didWarnAboutDeprecatedWillMount[_componentName4] = true;
3695
+ }
3696
+ }
3697
+ } // In order to support react-lifecycles-compat polyfilled components,
3698
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
3699
+
3700
+
3701
+ if (typeof Component.getDerivedStateFromProps !== 'function') {
3702
+ inst.componentWillMount();
3703
+ }
3704
+ }
3705
+
3706
+ if (typeof inst.UNSAFE_componentWillMount === 'function' && typeof Component.getDerivedStateFromProps !== 'function') {
3707
+ // In order to support react-lifecycles-compat polyfilled components,
3708
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
3709
+ inst.UNSAFE_componentWillMount();
3710
+ }
3711
+
3712
+ if (queue.length) {
3713
+ var oldQueue = queue;
3714
+ var oldReplace = replace;
3715
+ queue = null;
3716
+ replace = false;
3717
+
3718
+ if (oldReplace && oldQueue.length === 1) {
3719
+ inst.state = oldQueue[0];
3720
+ } else {
3721
+ var nextState = oldReplace ? oldQueue[0] : inst.state;
3722
+ var dontMutate = true;
3723
+
3724
+ for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
3725
+ var partial = oldQueue[i];
3726
+
3727
+ var _partialState = typeof partial === 'function' ? partial.call(inst, nextState, element.props, publicContext) : partial;
3728
+
3729
+ if (_partialState != null) {
3730
+ if (dontMutate) {
3731
+ dontMutate = false;
3732
+ nextState = _assign({}, nextState, _partialState);
3733
+ } else {
3734
+ _assign(nextState, _partialState);
3735
+ }
3736
+ }
3737
+ }
3738
+
3739
+ inst.state = nextState;
3740
+ }
3741
+ } else {
3742
+ queue = null;
3743
+ }
3744
+ }
3745
+
3746
+ child = inst.render();
3747
+
3748
+ {
3749
+ if (child === undefined && inst.render._isMockFunction) {
3750
+ // This is probably bad practice. Consider warning here and
3751
+ // deprecating this convenience.
3752
+ child = null;
3753
+ }
3754
+ }
3755
+
3756
+ validateRenderResult(child, Component);
3757
+ var childContext;
3758
+
3759
+ {
3760
+ if (typeof inst.getChildContext === 'function') {
3761
+ var _childContextTypes = Component.childContextTypes;
3762
+
3763
+ if (typeof _childContextTypes === 'object') {
3764
+ childContext = inst.getChildContext();
3765
+
3766
+ for (var contextKey in childContext) {
3767
+ if (!(contextKey in _childContextTypes)) {
3768
+ {
3769
+ throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
3770
+ }
3771
+ }
3772
+ }
3773
+ } else {
3774
+ {
3775
+ error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
3776
+ }
3777
+ }
3778
+ }
3779
+
3780
+ if (childContext) {
3781
+ context = _assign({}, context, childContext);
3782
+ }
3783
+ }
3784
+ }
3785
+
3786
+ return {
3787
+ child: child,
3788
+ context: context
3789
+ };
3790
+ }
3791
+
3792
+ var ReactDOMServerRenderer = /*#__PURE__*/function () {
3793
+ // TODO: type this more strictly:
3794
+ // DEV-only
3795
+ function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
3796
+ var flatChildren = flattenTopLevelChildren(children);
3797
+ var topFrame = {
3798
+ type: null,
3799
+ // Assume all trees start in the HTML namespace (not totally true, but
3800
+ // this is what we did historically)
3801
+ domNamespace: Namespaces.html,
3802
+ children: flatChildren,
3803
+ childIndex: 0,
3804
+ context: emptyObject,
3805
+ footer: ''
3806
+ };
3807
+
3808
+ {
3809
+ topFrame.debugElementStack = [];
3810
+ }
3811
+
3812
+ this.threadID = allocThreadID();
3813
+ this.stack = [topFrame];
3814
+ this.exhausted = false;
3815
+ this.currentSelectValue = null;
3816
+ this.previousWasTextNode = false;
3817
+ this.makeStaticMarkup = makeStaticMarkup;
3818
+ this.suspenseDepth = 0; // Context (new API)
3819
+
3820
+ this.contextIndex = -1;
3821
+ this.contextStack = [];
3822
+ this.contextValueStack = []; // useOpaqueIdentifier ID
3823
+
3824
+ this.uniqueID = 0;
3825
+ this.identifierPrefix = options && options.identifierPrefix || '';
3826
+
3827
+ {
3828
+ this.contextProviderStack = [];
3829
+ }
3830
+ }
3831
+
3832
+ var _proto = ReactDOMServerRenderer.prototype;
3833
+
3834
+ _proto.destroy = function destroy() {
3835
+ if (!this.exhausted) {
3836
+ this.exhausted = true;
3837
+ this.clearProviders();
3838
+ freeThreadID(this.threadID);
3839
+ }
3840
+ }
3841
+ /**
3842
+ * Note: We use just two stacks regardless of how many context providers you have.
3843
+ * Providers are always popped in the reverse order to how they were pushed
3844
+ * so we always know on the way down which provider you'll encounter next on the way up.
3845
+ * On the way down, we push the current provider, and its context value *before*
3846
+ * we mutated it, onto the stacks. Therefore, on the way up, we always know which
3847
+ * provider needs to be "restored" to which value.
3848
+ * https://github.com/facebook/react/pull/12985#issuecomment-396301248
3849
+ */
3850
+ ;
3851
+
3852
+ _proto.pushProvider = function pushProvider(provider) {
3853
+ var index = ++this.contextIndex;
3854
+ var context = provider.type._context;
3855
+ var threadID = this.threadID;
3856
+ validateContextBounds(context, threadID);
3857
+ var previousValue = context[threadID]; // Remember which value to restore this context to on our way up.
3858
+
3859
+ this.contextStack[index] = context;
3860
+ this.contextValueStack[index] = previousValue;
3861
+
3862
+ {
3863
+ // Only used for push/pop mismatch warnings.
3864
+ this.contextProviderStack[index] = provider;
3865
+ } // Mutate the current value.
3866
+
3867
+
3868
+ context[threadID] = provider.props.value;
3869
+ };
3870
+
3871
+ _proto.popProvider = function popProvider(provider) {
3872
+ var index = this.contextIndex;
3873
+
3874
+ {
3875
+ if (index < 0 || provider !== this.contextProviderStack[index]) {
3876
+ error('Unexpected pop.');
3877
+ }
3878
+ }
3879
+
3880
+ var context = this.contextStack[index];
3881
+ var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any`
3882
+ // because conceptually they are deletions--as long as we
3883
+ // promise to never access values beyond `this.contextIndex`.
3884
+
3885
+ this.contextStack[index] = null;
3886
+ this.contextValueStack[index] = null;
3887
+
3888
+ {
3889
+ this.contextProviderStack[index] = null;
3890
+ }
3891
+
3892
+ this.contextIndex--; // Restore to the previous value we stored as we were walking down.
3893
+ // We've already verified that this context has been expanded to accommodate
3894
+ // this thread id, so we don't need to do it again.
3895
+
3896
+ context[this.threadID] = previousValue;
3897
+ };
3898
+
3899
+ _proto.clearProviders = function clearProviders() {
3900
+ // Restore any remaining providers on the stack to previous values
3901
+ for (var index = this.contextIndex; index >= 0; index--) {
3902
+ var context = this.contextStack[index];
3903
+ var previousValue = this.contextValueStack[index];
3904
+ context[this.threadID] = previousValue;
3905
+ }
3906
+ };
3907
+
3908
+ _proto.read = function read(bytes) {
3909
+ if (this.exhausted) {
3910
+ return null;
3911
+ }
3912
+
3913
+ var prevPartialRenderer = currentPartialRenderer;
3914
+ setCurrentPartialRenderer(this);
3915
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
3916
+ ReactCurrentDispatcher$1.current = Dispatcher;
3917
+
3918
+ try {
3919
+ // Markup generated within <Suspense> ends up buffered until we know
3920
+ // nothing in that boundary suspended
3921
+ var out = [''];
3922
+ var suspended = false;
3923
+
3924
+ while (out[0].length < bytes) {
3925
+ if (this.stack.length === 0) {
3926
+ this.exhausted = true;
3927
+ freeThreadID(this.threadID);
3928
+ break;
3929
+ }
3930
+
3931
+ var frame = this.stack[this.stack.length - 1];
3932
+
3933
+ if (suspended || frame.childIndex >= frame.children.length) {
3934
+ var footer = frame.footer;
3935
+
3936
+ if (footer !== '') {
3937
+ this.previousWasTextNode = false;
3938
+ }
3939
+
3940
+ this.stack.pop();
3941
+
3942
+ if (frame.type === 'select') {
3943
+ this.currentSelectValue = null;
3944
+ } else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
3945
+ var provider = frame.type;
3946
+ this.popProvider(provider);
3947
+ } else if (frame.type === REACT_SUSPENSE_TYPE) {
3948
+ this.suspenseDepth--;
3949
+ var buffered = out.pop();
3950
+
3951
+ if (suspended) {
3952
+ suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame
3953
+
3954
+ var fallbackFrame = frame.fallbackFrame;
3955
+
3956
+ if (!fallbackFrame) {
3957
+ {
3958
+ 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));
3959
+ }
3960
+ }
3961
+
3962
+ this.stack.push(fallbackFrame);
3963
+ out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
3964
+
3965
+ continue;
3966
+ } else {
3967
+ out[this.suspenseDepth] += buffered;
3968
+ }
3969
+ } // Flush output
3970
+
3971
+
3972
+ out[this.suspenseDepth] += footer;
3973
+ continue;
3974
+ }
3975
+
3976
+ var child = frame.children[frame.childIndex++];
3977
+ var outBuffer = '';
3978
+
3979
+ if (true) {
3980
+ pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
3981
+
3982
+ frame.debugElementStack.length = 0;
3983
+ }
3984
+
3985
+ try {
3986
+ outBuffer += this.render(child, frame.context, frame.domNamespace);
3987
+ } catch (err) {
3988
+ if (err != null && typeof err.then === 'function') {
3989
+ if (enableSuspenseServerRenderer) ; else {
3990
+ if (!false) {
3991
+ {
3992
+ throw Error(true ? "ReactDOMServer does not yet support Suspense." : formatProdErrorMessage(294));
3993
+ }
3994
+ }
3995
+ }
3996
+ } else {
3997
+ throw err;
3998
+ }
3999
+ } finally {
4000
+ if (true) {
4001
+ popCurrentDebugStack();
4002
+ }
4003
+ }
4004
+
4005
+ if (out.length <= this.suspenseDepth) {
4006
+ out.push('');
4007
+ }
4008
+
4009
+ out[this.suspenseDepth] += outBuffer;
4010
+ }
4011
+
4012
+ return out[0];
4013
+ } finally {
4014
+ ReactCurrentDispatcher$1.current = prevDispatcher;
4015
+ setCurrentPartialRenderer(prevPartialRenderer);
4016
+ resetHooksState();
4017
+ }
4018
+ };
4019
+
4020
+ _proto.render = function render(child, context, parentNamespace) {
4021
+ if (typeof child === 'string' || typeof child === 'number') {
4022
+ var text = '' + child;
4023
+
4024
+ if (text === '') {
4025
+ return '';
4026
+ }
4027
+
4028
+ if (this.makeStaticMarkup) {
4029
+ return escapeTextForBrowser(text);
4030
+ }
4031
+
4032
+ if (this.previousWasTextNode) {
4033
+ return '<!-- -->' + escapeTextForBrowser(text);
4034
+ }
4035
+
4036
+ this.previousWasTextNode = true;
4037
+ return escapeTextForBrowser(text);
4038
+ } else {
4039
+ var nextChild;
4040
+
4041
+ var _resolve = resolve(child, context, this.threadID);
4042
+
4043
+ nextChild = _resolve.child;
4044
+ context = _resolve.context;
4045
+
4046
+ if (nextChild === null || nextChild === false) {
4047
+ return '';
4048
+ } else if (!React$1.isValidElement(nextChild)) {
4049
+ if (nextChild != null && nextChild.$$typeof != null) {
4050
+ // Catch unexpected special types early.
4051
+ var $$typeof = nextChild.$$typeof;
4052
+
4053
+ if (!($$typeof !== REACT_PORTAL_TYPE)) {
4054
+ {
4055
+ throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
4056
+ }
4057
+ } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
4058
+
4059
+
4060
+ {
4061
+ {
4062
+ throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
4063
+ }
4064
+ }
4065
+ }
4066
+
4067
+ var nextChildren = toArray(nextChild);
4068
+ var frame = {
4069
+ type: null,
4070
+ domNamespace: parentNamespace,
4071
+ children: nextChildren,
4072
+ childIndex: 0,
4073
+ context: context,
4074
+ footer: ''
4075
+ };
4076
+
4077
+ {
4078
+ frame.debugElementStack = [];
4079
+ }
4080
+
4081
+ this.stack.push(frame);
4082
+ return '';
4083
+ } // Safe because we just checked it's an element.
4084
+
4085
+
4086
+ var nextElement = nextChild;
4087
+ var elementType = nextElement.type;
4088
+
4089
+ if (typeof elementType === 'string') {
4090
+ return this.renderDOM(nextElement, context, parentNamespace);
4091
+ }
4092
+
4093
+ switch (elementType) {
4094
+ // TODO: LegacyHidden acts the same as a fragment. This only works
4095
+ // because we currently assume that every instance of LegacyHidden is
4096
+ // accompanied by a host component wrapper. In the hidden mode, the host
4097
+ // component is given a `hidden` attribute, which ensures that the
4098
+ // initial HTML is not visible. To support the use of LegacyHidden as a
4099
+ // true fragment, without an extra DOM node, we would have to hide the
4100
+ // initial HTML in some other way.
4101
+ case REACT_LEGACY_HIDDEN_TYPE:
4102
+ case REACT_DEBUG_TRACING_MODE_TYPE:
4103
+ case REACT_STRICT_MODE_TYPE:
4104
+ case REACT_PROFILER_TYPE:
4105
+ case REACT_SUSPENSE_LIST_TYPE:
4106
+ case REACT_FRAGMENT_TYPE:
4107
+ {
4108
+ var _nextChildren = toArray(nextChild.props.children);
4109
+
4110
+ var _frame = {
4111
+ type: null,
4112
+ domNamespace: parentNamespace,
4113
+ children: _nextChildren,
4114
+ childIndex: 0,
4115
+ context: context,
4116
+ footer: ''
4117
+ };
4118
+
4119
+ {
4120
+ _frame.debugElementStack = [];
4121
+ }
4122
+
4123
+ this.stack.push(_frame);
4124
+ return '';
4125
+ }
4126
+
4127
+ case REACT_SUSPENSE_TYPE:
4128
+ {
4129
+ {
4130
+ {
4131
+ {
4132
+ throw Error( "ReactDOMServer does not yet support Suspense." );
4133
+ }
4134
+ }
4135
+ }
4136
+ }
4137
+ // eslint-disable-next-line-no-fallthrough
4138
+
4139
+ case REACT_SCOPE_TYPE:
4140
+ {
4141
+
4142
+ {
4143
+ {
4144
+ throw Error( "ReactDOMServer does not yet support scope components." );
4145
+ }
4146
+ }
4147
+ }
4148
+ }
4149
+
4150
+ if (typeof elementType === 'object' && elementType !== null) {
4151
+ switch (elementType.$$typeof) {
4152
+ case REACT_FORWARD_REF_TYPE:
4153
+ {
4154
+ var element = nextChild;
4155
+
4156
+ var _nextChildren5;
4157
+
4158
+ var componentIdentity = {};
4159
+ prepareToUseHooks(componentIdentity);
4160
+ _nextChildren5 = elementType.render(element.props, element.ref);
4161
+ _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
4162
+ _nextChildren5 = toArray(_nextChildren5);
4163
+ var _frame5 = {
4164
+ type: null,
4165
+ domNamespace: parentNamespace,
4166
+ children: _nextChildren5,
4167
+ childIndex: 0,
4168
+ context: context,
4169
+ footer: ''
4170
+ };
4171
+
4172
+ {
4173
+ _frame5.debugElementStack = [];
4174
+ }
4175
+
4176
+ this.stack.push(_frame5);
4177
+ return '';
4178
+ }
4179
+
4180
+ case REACT_MEMO_TYPE:
4181
+ {
4182
+ var _element = nextChild;
4183
+ var _nextChildren6 = [React$1.createElement(elementType.type, _assign({
4184
+ ref: _element.ref
4185
+ }, _element.props))];
4186
+ var _frame6 = {
4187
+ type: null,
4188
+ domNamespace: parentNamespace,
4189
+ children: _nextChildren6,
4190
+ childIndex: 0,
4191
+ context: context,
4192
+ footer: ''
4193
+ };
4194
+
4195
+ {
4196
+ _frame6.debugElementStack = [];
4197
+ }
4198
+
4199
+ this.stack.push(_frame6);
4200
+ return '';
4201
+ }
4202
+
4203
+ case REACT_PROVIDER_TYPE:
4204
+ {
4205
+ var provider = nextChild;
4206
+ var nextProps = provider.props;
4207
+
4208
+ var _nextChildren7 = toArray(nextProps.children);
4209
+
4210
+ var _frame7 = {
4211
+ type: provider,
4212
+ domNamespace: parentNamespace,
4213
+ children: _nextChildren7,
4214
+ childIndex: 0,
4215
+ context: context,
4216
+ footer: ''
4217
+ };
4218
+
4219
+ {
4220
+ _frame7.debugElementStack = [];
4221
+ }
4222
+
4223
+ this.pushProvider(provider);
4224
+ this.stack.push(_frame7);
4225
+ return '';
4226
+ }
4227
+
4228
+ case REACT_CONTEXT_TYPE:
4229
+ {
4230
+ var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In
4231
+ // DEV mode, we create a separate object for Context.Consumer that acts
4232
+ // like a proxy to Context. This proxy object adds unnecessary code in PROD
4233
+ // so we use the old behaviour (Context.Consumer references Context) to
4234
+ // reduce size and overhead. The separate object references context via
4235
+ // a property called "_context", which also gives us the ability to check
4236
+ // in DEV mode if this property exists or not and warn if it does not.
4237
+
4238
+ {
4239
+ if (reactContext._context === undefined) {
4240
+ // This may be because it's a Context (rather than a Consumer).
4241
+ // Or it may be because it's older React where they're the same thing.
4242
+ // We only want to warn if we're sure it's a new React.
4243
+ if (reactContext !== reactContext.Consumer) {
4244
+ if (!hasWarnedAboutUsingContextAsConsumer) {
4245
+ hasWarnedAboutUsingContextAsConsumer = true;
4246
+
4247
+ error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
4248
+ }
4249
+ }
4250
+ } else {
4251
+ reactContext = reactContext._context;
4252
+ }
4253
+ }
4254
+
4255
+ var _nextProps = nextChild.props;
4256
+ var threadID = this.threadID;
4257
+ validateContextBounds(reactContext, threadID);
4258
+ var nextValue = reactContext[threadID];
4259
+
4260
+ var _nextChildren8 = toArray(_nextProps.children(nextValue));
4261
+
4262
+ var _frame8 = {
4263
+ type: nextChild,
4264
+ domNamespace: parentNamespace,
4265
+ children: _nextChildren8,
4266
+ childIndex: 0,
4267
+ context: context,
4268
+ footer: ''
4269
+ };
4270
+
4271
+ {
4272
+ _frame8.debugElementStack = [];
4273
+ }
4274
+
4275
+ this.stack.push(_frame8);
4276
+ return '';
4277
+ }
4278
+ // eslint-disable-next-line-no-fallthrough
4279
+
4280
+ case REACT_FUNDAMENTAL_TYPE:
4281
+ {
4282
+
4283
+ {
4284
+ {
4285
+ throw Error( "ReactDOMServer does not yet support the fundamental API." );
4286
+ }
4287
+ }
4288
+ }
4289
+ // eslint-disable-next-line-no-fallthrough
4290
+
4291
+ case REACT_LAZY_TYPE:
4292
+ {
4293
+ var _element2 = nextChild;
4294
+ var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the
4295
+ // suspense server-side renderer is enabled so synchronously
4296
+ // resolved constructors are supported.
4297
+
4298
+ var payload = lazyComponent._payload;
4299
+ var init = lazyComponent._init;
4300
+ var result = init(payload);
4301
+ var _nextChildren10 = [React$1.createElement(result, _assign({
4302
+ ref: _element2.ref
4303
+ }, _element2.props))];
4304
+ var _frame10 = {
4305
+ type: null,
4306
+ domNamespace: parentNamespace,
4307
+ children: _nextChildren10,
4308
+ childIndex: 0,
4309
+ context: context,
4310
+ footer: ''
4311
+ };
4312
+
4313
+ {
4314
+ _frame10.debugElementStack = [];
4315
+ }
4316
+
4317
+ this.stack.push(_frame10);
4318
+ return '';
4319
+ }
4320
+ }
4321
+ }
4322
+
4323
+ var info = '';
4324
+
4325
+ {
4326
+ var owner = nextElement._owner;
4327
+
4328
+ if (elementType === undefined || typeof elementType === 'object' && elementType !== null && Object.keys(elementType).length === 0) {
4329
+ 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.';
4330
+ }
4331
+
4332
+ var ownerName = owner ? getComponentName(owner) : null;
4333
+
4334
+ if (ownerName) {
4335
+ info += '\n\nCheck the render method of `' + ownerName + '`.';
4336
+ }
4337
+ }
4338
+
4339
+ {
4340
+ {
4341
+ 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 );
4342
+ }
4343
+ }
4344
+ }
4345
+ };
4346
+
4347
+ _proto.renderDOM = function renderDOM(element, context, parentNamespace) {
4348
+ var tag = element.type.toLowerCase();
4349
+ var namespace = parentNamespace;
4350
+
4351
+ if (parentNamespace === Namespaces.html) {
4352
+ namespace = getIntrinsicNamespace(tag);
4353
+ }
4354
+
4355
+ {
4356
+ if (namespace === Namespaces.html) {
4357
+ // Should this check be gated by parent namespace? Not sure we want to
4358
+ // allow <SVG> or <mATH>.
4359
+ if (tag !== element.type) {
4360
+ error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
4361
+ }
4362
+ }
4363
+ }
4364
+
4365
+ validateDangerousTag(tag);
4366
+ var props = element.props;
4367
+
4368
+ if (tag === 'input') {
4369
+ {
4370
+ checkControlledValueProps('input', props);
4371
+
4372
+ if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
4373
+ 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://reactjs.org/link/controlled-components', 'A component', props.type);
4374
+
4375
+ didWarnDefaultChecked = true;
4376
+ }
4377
+
4378
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
4379
+ 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://reactjs.org/link/controlled-components', 'A component', props.type);
4380
+
4381
+ didWarnDefaultInputValue = true;
4382
+ }
4383
+ }
4384
+
4385
+ props = _assign({
4386
+ type: undefined
4387
+ }, props, {
4388
+ defaultChecked: undefined,
4389
+ defaultValue: undefined,
4390
+ value: props.value != null ? props.value : props.defaultValue,
4391
+ checked: props.checked != null ? props.checked : props.defaultChecked
4392
+ });
4393
+ } else if (tag === 'textarea') {
4394
+ {
4395
+ checkControlledValueProps('textarea', props);
4396
+
4397
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
4398
+ 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://reactjs.org/link/controlled-components');
4399
+
4400
+ didWarnDefaultTextareaValue = true;
4401
+ }
4402
+ }
4403
+
4404
+ var initialValue = props.value;
4405
+
4406
+ if (initialValue == null) {
4407
+ var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>.
4408
+
4409
+ var textareaChildren = props.children;
4410
+
4411
+ if (textareaChildren != null) {
4412
+ {
4413
+ error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
4414
+ }
4415
+
4416
+ if (!(defaultValue == null)) {
4417
+ {
4418
+ throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
4419
+ }
4420
+ }
4421
+
4422
+ if (Array.isArray(textareaChildren)) {
4423
+ if (!(textareaChildren.length <= 1)) {
4424
+ {
4425
+ throw Error( "<textarea> can only have at most one child." );
4426
+ }
4427
+ }
4428
+
4429
+ textareaChildren = textareaChildren[0];
4430
+ }
4431
+
4432
+ defaultValue = '' + textareaChildren;
4433
+ }
4434
+
4435
+ if (defaultValue == null) {
4436
+ defaultValue = '';
4437
+ }
4438
+
4439
+ initialValue = defaultValue;
4440
+ }
4441
+
4442
+ props = _assign({}, props, {
4443
+ value: undefined,
4444
+ children: '' + initialValue
4445
+ });
4446
+ } else if (tag === 'select') {
4447
+ {
4448
+ checkControlledValueProps('select', props);
4449
+
4450
+ for (var i = 0; i < valuePropNames.length; i++) {
4451
+ var propName = valuePropNames[i];
4452
+
4453
+ if (props[propName] == null) {
4454
+ continue;
4455
+ }
4456
+
4457
+ var isArray = Array.isArray(props[propName]);
4458
+
4459
+ if (props.multiple && !isArray) {
4460
+ error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
4461
+ } else if (!props.multiple && isArray) {
4462
+ error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
4463
+ }
4464
+ }
4465
+
4466
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
4467
+ 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://reactjs.org/link/controlled-components');
4468
+
4469
+ didWarnDefaultSelectValue = true;
4470
+ }
4471
+ }
4472
+
4473
+ this.currentSelectValue = props.value != null ? props.value : props.defaultValue;
4474
+ props = _assign({}, props, {
4475
+ value: undefined
4476
+ });
4477
+ } else if (tag === 'option') {
4478
+ var selected = null;
4479
+ var selectValue = this.currentSelectValue;
4480
+ var optionChildren = flattenOptionChildren(props.children);
4481
+
4482
+ if (selectValue != null) {
4483
+ var value;
4484
+
4485
+ if (props.value != null) {
4486
+ value = props.value + '';
4487
+ } else {
4488
+ value = optionChildren;
4489
+ }
4490
+
4491
+ selected = false;
4492
+
4493
+ if (Array.isArray(selectValue)) {
4494
+ // multiple
4495
+ for (var j = 0; j < selectValue.length; j++) {
4496
+ if ('' + selectValue[j] === value) {
4497
+ selected = true;
4498
+ break;
4499
+ }
4500
+ }
4501
+ } else {
4502
+ selected = '' + selectValue === value;
4503
+ }
4504
+
4505
+ props = _assign({
4506
+ selected: undefined,
4507
+ children: undefined
4508
+ }, props, {
4509
+ selected: selected,
4510
+ children: optionChildren
4511
+ });
4512
+ }
4513
+ }
4514
+
4515
+ {
4516
+ validatePropertiesInDevelopment(tag, props);
4517
+ }
4518
+
4519
+ assertValidProps(tag, props);
4520
+ var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
4521
+ var footer = '';
4522
+
4523
+ if (omittedCloseTags.hasOwnProperty(tag)) {
4524
+ out += '/>';
4525
+ } else {
4526
+ out += '>';
4527
+ footer = '</' + element.type + '>';
4528
+ }
4529
+
4530
+ var children;
4531
+ var innerMarkup = getNonChildrenInnerMarkup(props);
4532
+
4533
+ if (innerMarkup != null) {
4534
+ children = [];
4535
+
4536
+ if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
4537
+ // text/html ignores the first character in these tags if it's a newline
4538
+ // Prefer to break application/xml over text/html (for now) by adding
4539
+ // a newline specifically to get eaten by the parser. (Alternately for
4540
+ // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
4541
+ // \r is normalized out by HTMLTextAreaElement#value.)
4542
+ // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
4543
+ // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
4544
+ // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
4545
+ // See: Parsing of "textarea" "listing" and "pre" elements
4546
+ // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
4547
+ out += '\n';
4548
+ }
4549
+
4550
+ out += innerMarkup;
4551
+ } else {
4552
+ children = toArray(props.children);
4553
+ }
4554
+
4555
+ var frame = {
4556
+ domNamespace: getChildNamespace(parentNamespace, element.type),
4557
+ type: tag,
4558
+ children: children,
4559
+ childIndex: 0,
4560
+ context: context,
4561
+ footer: footer
4562
+ };
4563
+
4564
+ {
4565
+ frame.debugElementStack = [];
4566
+ }
4567
+
4568
+ this.stack.push(frame);
4569
+ this.previousWasTextNode = false;
4570
+ return out;
4571
+ };
4572
+
4573
+ return ReactDOMServerRenderer;
4574
+ }();
4575
+
4576
+ /**
4577
+ * Render a ReactElement to its initial HTML. This should only be used on the
4578
+ * server.
4579
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostring
4580
+ */
4581
+
4582
+ function renderToString(element, options) {
4583
+ var renderer = new ReactDOMServerRenderer(element, false, options);
4584
+
4585
+ try {
4586
+ var markup = renderer.read(Infinity);
4587
+ return markup;
4588
+ } finally {
4589
+ renderer.destroy();
4590
+ }
4591
+ }
4592
+ /**
4593
+ * Similar to renderToString, except this doesn't create extra DOM attributes
4594
+ * such as data-react-id that React uses internally.
4595
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
4596
+ */
4597
+
4598
+ function renderToStaticMarkup(element, options) {
4599
+ var renderer = new ReactDOMServerRenderer(element, true, options);
4600
+
4601
+ try {
4602
+ var markup = renderer.read(Infinity);
4603
+ return markup;
4604
+ } finally {
4605
+ renderer.destroy();
4606
+ }
4607
+ }
4608
+
4609
+ function renderToNodeStream() {
4610
+ {
4611
+ {
4612
+ throw Error( "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead." );
4613
+ }
4614
+ }
4615
+ }
4616
+
4617
+ function renderToStaticNodeStream() {
4618
+ {
4619
+ {
4620
+ throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
4621
+ }
4622
+ }
4623
+ }
4624
+
4625
+ reactDomServer_browser_development.renderToNodeStream = renderToNodeStream;
4626
+ reactDomServer_browser_development.renderToStaticMarkup = renderToStaticMarkup;
4627
+ reactDomServer_browser_development.renderToStaticNodeStream = renderToStaticNodeStream;
4628
+ reactDomServer_browser_development.renderToString = renderToString;
4629
+ reactDomServer_browser_development.version = ReactVersion;
4630
+ })();
4631
+ }
4632
+ return reactDomServer_browser_development;
4633
+ }
4634
+
4635
+ var hasRequiredServer_browser;
4636
+
4637
+ function requireServer_browser () {
4638
+ if (hasRequiredServer_browser) return server_browser.exports;
4639
+ hasRequiredServer_browser = 1;
4640
+
4641
+ if (process.env.NODE_ENV === 'production') {
4642
+ server_browser.exports = requireReactDomServer_browser_production_min();
4643
+ } else {
4644
+ server_browser.exports = requireReactDomServer_browser_development();
4645
+ }
4646
+ return server_browser.exports;
4647
+ }
4648
+
4649
+ var server_browserExports = requireServer_browser();
4650
+ var ReactDOMServer = /*@__PURE__*/getDefaultExportFromCjs(server_browserExports);
4651
+
155
4652
  const defaultFetch = (url, options) => {
156
4653
  return fetch(url, {
157
4654
  credentials: "include",
@@ -369,7 +4866,7 @@ const X = ({
369
4866
  fill: fill
370
4867
  })));
371
4868
 
372
- var styles$b = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU"};
4869
+ var styles$b = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement--promo":"announcement--promo-FarUk","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU","dismiss--promo":"dismiss--promo-7zvO4"};
373
4870
 
374
4871
  function AnnouncementIcon() {
375
4872
  return /*#__PURE__*/React.createElement("svg", {
@@ -388,6 +4885,63 @@ function AnnouncementIcon() {
388
4885
  }));
389
4886
  }
390
4887
 
4888
+ function PromoBackground() {
4889
+ return /*#__PURE__*/React.createElement("svg", {
4890
+ width: "1724",
4891
+ height: "1080",
4892
+ viewBox: "0 0 1724 1080",
4893
+ fill: "none",
4894
+ xmlns: "http://www.w3.org/2000/svg"
4895
+ }, /*#__PURE__*/React.createElement("g", {
4896
+ filter: "url(#filter0_f_154_9174)"
4897
+ }, /*#__PURE__*/React.createElement("rect", {
4898
+ x: "606.744",
4899
+ y: "1062.82",
4900
+ width: "649.488",
4901
+ height: "964.695",
4902
+ rx: "324.744",
4903
+ transform: "rotate(-120 606.744 1062.82)",
4904
+ fill: "url(#paint0_linear_154_9174)",
4905
+ fillOpacity: "0.5"
4906
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("filter", {
4907
+ id: "filter0_f_154_9174",
4908
+ x: "0.810547",
4909
+ y: "-263.19",
4910
+ width: "1722.57",
4911
+ height: "1607.2",
4912
+ filterUnits: "userSpaceOnUse",
4913
+ colorInterpolationFilters: "sRGB"
4914
+ }, /*#__PURE__*/React.createElement("feFlood", {
4915
+ floodOpacity: "0",
4916
+ result: "BackgroundImageFix"
4917
+ }), /*#__PURE__*/React.createElement("feBlend", {
4918
+ mode: "normal",
4919
+ in: "SourceGraphic",
4920
+ in2: "BackgroundImageFix",
4921
+ result: "shape"
4922
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
4923
+ stdDeviation: "200",
4924
+ result: "effect1_foregroundBlur_154_9174"
4925
+ })), /*#__PURE__*/React.createElement("linearGradient", {
4926
+ id: "paint0_linear_154_9174",
4927
+ x1: "1040.11",
4928
+ y1: "1031.29",
4929
+ x2: "1407.11",
4930
+ y2: "1806.85",
4931
+ gradientUnits: "userSpaceOnUse"
4932
+ }, /*#__PURE__*/React.createElement("stop", {
4933
+ offset: "0.21875",
4934
+ stopColor: "#FFD748"
4935
+ }), /*#__PURE__*/React.createElement("stop", {
4936
+ offset: "0.541667",
4937
+ stopColor: "#FF4242"
4938
+ }), /*#__PURE__*/React.createElement("stop", {
4939
+ offset: "0.84375",
4940
+ stopColor: "#657CF1"
4941
+ }))));
4942
+ }
4943
+
4944
+ const promoBackgroundUrl = `url("data:image/svg+xml,${encodeURIComponent(ReactDOMServer.renderToStaticMarkup(/*#__PURE__*/React.createElement(PromoBackground)))}")`;
391
4945
  const entries = function (obj) {
392
4946
  const ownProps = Object.keys(obj);
393
4947
  let i = ownProps.length;
@@ -437,11 +4991,20 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React.Component {
437
4991
  render() {
438
4992
  const {
439
4993
  style,
4994
+ variant,
440
4995
  ...platformProps
441
4996
  } = this.props;
4997
+ const isPromo = variant === "promo";
442
4998
  return /*#__PURE__*/React.createElement("div", {
443
- className: classnames(styles$b["announcement"], styles$b["announcement--platform"])
444
- }, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
4999
+ className: classnames(styles$b["announcement"], styles$b[`announcement--${variant !== null && variant !== void 0 ? variant : "platform"}`]),
5000
+ "data-announcement-variant": variant !== null && variant !== void 0 ? variant : "platform",
5001
+ style: isPromo ? {
5002
+ backgroundImage: promoBackgroundUrl,
5003
+ backgroundPosition: "center center",
5004
+ backgroundRepeat: "no-repeat",
5005
+ backgroundSize: "cover"
5006
+ } : undefined
5007
+ }, !isPromo && /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
445
5008
  className: styles$b["announcement-content"],
446
5009
  style: style,
447
5010
  ...platformProps
@@ -464,10 +5027,12 @@ class PlatformAnnouncements extends React.Component {
464
5027
  env: this.props.env,
465
5028
  initialAnnouncements: this.props.data,
466
5029
  configuredFetch: this.props.configuredFetch
467
- }, (data, actions) => Boolean(data.announcements.length > 0) ? (/*#__PURE__*/React.createElement("div", null, data.announcements.map(announcement => this.props.renderItem({
468
- actions,
469
- announcement
470
- })))) : null));
5030
+ }, (data, actions) => {
5031
+ return data.announcements.length > 0 ? (/*#__PURE__*/React.createElement("div", null, data.announcements.map(announcement => this.props.renderItem({
5032
+ actions,
5033
+ announcement
5034
+ })))) : null;
5035
+ }));
471
5036
  }
472
5037
  }
473
5038
  PlatformAnnouncements.defaultProps = {
@@ -475,33 +5040,39 @@ PlatformAnnouncements.defaultProps = {
475
5040
  renderItem: ({
476
5041
  announcement,
477
5042
  actions
478
- }) => (/*#__PURE__*/React.createElement(DissmissibleAnnouncement, {
5043
+ }) => (/*#__PURE__*/React.createElement(DismissibleAnnouncement, {
479
5044
  key: announcement.id,
480
5045
  html: announcement.data.html,
5046
+ variant: announcement.data.style,
481
5047
  onClick: () => actions.dismissAnnouncements(announcement.id)
482
5048
  }))
483
5049
  };
484
5050
  function StyledDismissButton$1({
5051
+ variant,
485
5052
  ...props
486
5053
  }) {
5054
+ const isPromo = variant === "promo";
487
5055
  return /*#__PURE__*/React.createElement("button", {
488
5056
  type: "button",
489
- className: styles$b.dismiss,
5057
+ className: classnames(styles$b.dismiss, isPromo && styles$b["dismiss--promo"]),
490
5058
  ...props
491
5059
  }, /*#__PURE__*/React.createElement(X, {
492
- fill: "white",
5060
+ fill: isPromo ? "currentColor" : "white",
493
5061
  style: {
494
5062
  height: 20,
495
5063
  width: 20
496
5064
  }
497
5065
  }));
498
5066
  }
499
- function DissmissibleAnnouncement(props) {
500
- return /*#__PURE__*/React.createElement(StyledAnnouncement$1, null, /*#__PURE__*/React.createElement("span", {
5067
+ function DismissibleAnnouncement(props) {
5068
+ return /*#__PURE__*/React.createElement(StyledAnnouncement$1, {
5069
+ variant: props.variant
5070
+ }, /*#__PURE__*/React.createElement("span", {
501
5071
  dangerouslySetInnerHTML: {
502
5072
  __html: props.html
503
5073
  }
504
5074
  }), /*#__PURE__*/React.createElement(StyledDismissButton$1, {
5075
+ variant: props.variant,
505
5076
  onClick: props.onClick
506
5077
  }));
507
5078
  }
@@ -698,7 +5269,47 @@ const useJoltEffect = (channelSubscription, eventName, callback) => {
698
5269
  }, [channelSubscription, callback]);
699
5270
  };
700
5271
 
5272
+ function useMediaQuery(query) {
5273
+ const getMatches = query => {
5274
+ // Prevents SSR issues
5275
+ if (typeof window !== "undefined") {
5276
+ return window.matchMedia(query).matches;
5277
+ }
5278
+ return false;
5279
+ };
5280
+ const [matches, setMatches] = React.useState(getMatches(query));
5281
+ function handleChange() {
5282
+ setMatches(getMatches(query));
5283
+ }
5284
+ React.useEffect(() => {
5285
+ const matchMedia = window.matchMedia(query);
5286
+ // Triggered at the first client-side load and if query changes
5287
+ handleChange();
5288
+ // Listen matchMedia
5289
+ if (matchMedia.addListener) {
5290
+ matchMedia.addListener(handleChange);
5291
+ } else {
5292
+ matchMedia.addEventListener("change", handleChange);
5293
+ }
5294
+ return () => {
5295
+ if (matchMedia.removeListener) {
5296
+ matchMedia.removeListener(handleChange);
5297
+ } else {
5298
+ matchMedia.removeEventListener("change", handleChange);
5299
+ }
5300
+ };
5301
+ }, [query]);
5302
+ return matches;
5303
+ }
5304
+
701
5305
  const capitalize = s => s.charAt(0).toUpperCase() + s.slice(1);
5306
+ const RESOLVED_COLOR_MODE_ATTRIBUTE = "data-resolved-color-mode";
5307
+ function resolveColorMode(colorMode) {
5308
+ if (colorMode === "system") {
5309
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
5310
+ }
5311
+ return colorMode;
5312
+ }
702
5313
  const debounce = (func, wait) => {
703
5314
  let timeout;
704
5315
  return function (...args) {
@@ -779,6 +5390,25 @@ const useNotificationsHasUnread = ({
779
5390
  return storedValue;
780
5391
  };
781
5392
 
5393
+ function createStore(initialState) {
5394
+ let currentState = initialState;
5395
+ const listeners = new Set();
5396
+ return {
5397
+ getState: () => currentState,
5398
+ setState: newState => {
5399
+ currentState = newState;
5400
+ listeners.forEach(listener => listener(currentState));
5401
+ },
5402
+ subscribe: listener => {
5403
+ listeners.add(listener);
5404
+ return () => listeners.delete(listener);
5405
+ }
5406
+ };
5407
+ }
5408
+ const store$1 = createStore({});
5409
+
5410
+ const useStore = (selector = state => state) => shim.useSyncExternalStore(store$1.subscribe, () => selector(store$1.getState()));
5411
+
782
5412
  const useTopbarAPI = ({
783
5413
  configuredFetch,
784
5414
  env
@@ -805,23 +5435,6 @@ const useTopbarAPI = ({
805
5435
  return resp;
806
5436
  };
807
5437
 
808
- function createStore(initialState) {
809
- let currentState = initialState;
810
- const listeners = new Set();
811
- return {
812
- getState: () => currentState,
813
- setState: newState => {
814
- currentState = newState;
815
- listeners.forEach(listener => listener(currentState));
816
- },
817
- subscribe: listener => {
818
- listeners.add(listener);
819
- return () => listeners.delete(listener);
820
- }
821
- };
822
- }
823
- const store$1 = createStore({});
824
-
825
5438
  const AppsProvider = ({
826
5439
  configuredFetch = defaultFetch,
827
5440
  enableJoltLogging,
@@ -841,6 +5454,10 @@ const AppsProvider = ({
841
5454
  const hasConnectedPeople = (_b = (_a = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.has_connected_people;
842
5455
  const mfaConfigured = !!((_d = (_c = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _c === void 0 ? void 0 : _c.attributes) === null || _d === void 0 ? void 0 : _d.mfa_configured);
843
5456
  const colorMode = (_f = (_e = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.color_mode;
5457
+ const {
5458
+ colorMode: currentColorMode
5459
+ } = useStore();
5460
+ const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
844
5461
  const name = (_h = (_g = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _g === void 0 ? void 0 : _g.attributes) === null || _h === void 0 ? void 0 : _h.name;
845
5462
  const notificationsEnabled = !window.notificationsDisabled;
846
5463
  const organizationTimeZone = ((_k = (_j = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _j === void 0 ? void 0 : _j.attributes) === null || _k === void 0 ? void 0 : _k.org_time_zone) || "America/Los_Angeles";
@@ -892,6 +5509,16 @@ const AppsProvider = ({
892
5509
  enabled: true,
893
5510
  joltChannel: notificationsJoltChannel
894
5511
  });
5512
+ React.useLayoutEffect(() => {
5513
+ if (colorMode) {
5514
+ document.documentElement.setAttribute(RESOLVED_COLOR_MODE_ATTRIBUTE, resolveColorMode(colorMode));
5515
+ }
5516
+ }, [colorMode]);
5517
+ React.useEffect(() => {
5518
+ if (currentColorMode === "system") {
5519
+ document.documentElement.setAttribute(RESOLVED_COLOR_MODE_ATTRIBUTE, prefersDark ? "dark" : "light");
5520
+ }
5521
+ }, [currentColorMode, prefersDark]);
895
5522
  React.useEffect(() => {
896
5523
  const state = store$1.getState();
897
5524
  store$1.setState({
@@ -2060,8 +6687,6 @@ const useSetCurrentRouteInfo = ({
2060
6687
  }, [routes, app]);
2061
6688
  };
2062
6689
 
2063
- const useStore = (selector = state => state) => shim.useSyncExternalStore(store$1.subscribe, () => selector(store$1.getState()));
2064
-
2065
6690
  const useUpdateStore = () => React.useCallback(updates => {
2066
6691
  const currentState = store$1.getState();
2067
6692
  store$1.setState({
@@ -2427,7 +7052,7 @@ function AccountSettingsLink({
2427
7052
  width: 24,
2428
7053
  xmlns: "http://www.w3.org/2000/svg"
2429
7054
  }, /*#__PURE__*/React.createElement(Accounts$1, {
2430
- color: "var(--t-icon-color-secondary",
7055
+ color: "var(--t-icon-color-secondary)",
2431
7056
  key: "key2"
2432
7057
  })), /*#__PURE__*/React.createElement("span", null, "Account settings"));
2433
7058
  }
@@ -2675,8 +7300,8 @@ function useFragmentKey(key) {
2675
7300
  function onHashChange() {
2676
7301
  updateFragment(location.hash);
2677
7302
  }
2678
- window.addEventListener('hashchange', onHashChange);
2679
- return () => window.removeEventListener('hashchange', onHashChange);
7303
+ window.addEventListener("hashchange", onHashChange);
7304
+ return () => window.removeEventListener("hashchange", onHashChange);
2680
7305
  }, [updateFragment]);
2681
7306
  return [value, updateFragment];
2682
7307
  }
@@ -2690,9 +7315,9 @@ function useFragmentRouting() {
2690
7315
  }, [updateFragment]);
2691
7316
  const route = React.useMemo(() => {
2692
7317
  if (toolbarFragment) {
2693
- const [tool, ...rest] = toolbarFragment.split('/');
7318
+ const [tool, ...rest] = toolbarFragment.split("/");
2694
7319
  return {
2695
- path: rest.join('/'),
7320
+ path: rest.join("/"),
2696
7321
  tool
2697
7322
  };
2698
7323
  } else {
@@ -2969,6 +7594,7 @@ function ColorModeSwitcher() {
2969
7594
  colorMode
2970
7595
  });
2971
7596
  document.documentElement.setAttribute("data-color-mode", colorMode);
7597
+ document.documentElement.setAttribute(RESOLVED_COLOR_MODE_ATTRIBUTE, resolveColorMode(colorMode));
2972
7598
  updateColorMode(colorMode);
2973
7599
  }
2974
7600
  }), /*#__PURE__*/React.createElement(ColorModeIcon, {
@@ -4225,11 +8851,11 @@ function useStableIframeSrcAttributeAndSyncFragmentRoute({
4225
8851
  return iframeSrc;
4226
8852
  }
4227
8853
  function encodeQueryString(path) {
4228
- const [pathPart, queryPart] = path.split('?', 2);
8854
+ const [pathPart, queryPart] = path.split("?", 2);
4229
8855
  return queryPart ? `${pathPart}?${encodeURIComponent(queryPart)}` : pathPart;
4230
8856
  }
4231
8857
  function decodeQueryString(path) {
4232
- const [pathPart, queryPart] = path.split('?', 2);
8858
+ const [pathPart, queryPart] = path.split("?", 2);
4233
8859
  return queryPart ? `${pathPart}?${decodeURIComponent(queryPart)}` : pathPart;
4234
8860
  }
4235
8861
 
@@ -4403,7 +9029,7 @@ function Toolbar({
4403
9029
  document.body.style.overflow = "hidden";
4404
9030
  window.scrollTo(0, 0);
4405
9031
  } else {
4406
- document.body.style.overflow = "auto";
9032
+ document.body.style.overflow = "";
4407
9033
  }
4408
9034
  }, [open]);
4409
9035
  // Listen for external close requests from store