You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					85 lines
				
				2.8 KiB
			
		
		
			
		
	
	
					85 lines
				
				2.8 KiB
			| 
								 
											3 years ago
										 
									 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @license React
							 | 
						||
| 
								 | 
							
								 * use-sync-external-store.development.js
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * Copyright (c) Facebook, Inc. and its affiliates.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * This source code is licensed under the MIT license found in the
							 | 
						||
| 
								 | 
							
								 * LICENSE file in the root directory of this source tree.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								'use strict';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								if (process.env.NODE_ENV !== "production") {
							 | 
						||
| 
								 | 
							
								  (function() {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								          'use strict';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
							 | 
						||
| 
								 | 
							
								if (
							 | 
						||
| 
								 | 
							
								  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
							 | 
						||
| 
								 | 
							
								  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
							 | 
						||
| 
								 | 
							
								    'function'
							 | 
						||
| 
								 | 
							
								) {
							 | 
						||
| 
								 | 
							
								  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								          var React = require('react');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								function error(format) {
							 | 
						||
| 
								 | 
							
								  {
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
							 | 
						||
| 
								 | 
							
								        args[_key2 - 1] = arguments[_key2];
							 | 
						||
| 
								 | 
							
								      }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      printWarning('error', format, args);
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								function printWarning(level, format, args) {
							 | 
						||
| 
								 | 
							
								  // When changing this logic, you might want to also
							 | 
						||
| 
								 | 
							
								  // update consoleWithStackDev.www.js as well.
							 | 
						||
| 
								 | 
							
								  {
							 | 
						||
| 
								 | 
							
								    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
							 | 
						||
| 
								 | 
							
								    var stack = ReactDebugCurrentFrame.getStackAddendum();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    if (stack !== '') {
							 | 
						||
| 
								 | 
							
								      format += '%s';
							 | 
						||
| 
								 | 
							
								      args = args.concat([stack]);
							 | 
						||
| 
								 | 
							
								    } // eslint-disable-next-line react-internal/safe-string-coercion
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    var argsWithFormat = args.map(function (item) {
							 | 
						||
| 
								 | 
							
								      return String(item);
							 | 
						||
| 
								 | 
							
								    }); // Careful: RN currently depends on this prefix
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
							 | 
						||
| 
								 | 
							
								    // breaks IE9: https://github.com/facebook/react/issues/13610
							 | 
						||
| 
								 | 
							
								    // eslint-disable-next-line react-internal/no-production-logging
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    Function.prototype.apply.call(console[level], console, argsWithFormat);
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var useSyncExternalStore = React.useSyncExternalStore;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								  error("The main 'use-sync-external-store' entry point is not supported; all it " + "does is re-export useSyncExternalStore from the 'react' package, so " + 'it only works with React 18+.' + '\n\n' + 'If you wish to support React 16 and 17, import from ' + "'use-sync-external-store/shim' instead. It will fall back to a shimmed " + 'implementation when the native one is not available.' + '\n\n' + "If you only support React 18+, you can import directly from 'react'.");
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								exports.useSyncExternalStore = useSyncExternalStore;
							 | 
						||
| 
								 | 
							
								          /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
							 | 
						||
| 
								 | 
							
								if (
							 | 
						||
| 
								 | 
							
								  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
							 | 
						||
| 
								 | 
							
								  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
							 | 
						||
| 
								 | 
							
								    'function'
							 | 
						||
| 
								 | 
							
								) {
							 | 
						||
| 
								 | 
							
								  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								  })();
							 | 
						||
| 
								 | 
							
								}
							 |